diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-03-13 13:50:15 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-03-13 13:50:15 -0300 |
commit | dbc0579cac0ed9f9af0bcf361a5c3fc56f4f8395 (patch) | |
tree | 8e9f703aba9ff7c66ddf4fef5a740a6ef44c71a4 /linux/drivers/media/video/tuner-core.c | |
parent | b4bd63c6ce993e0bf2bf3aaecc3384740b495845 (diff) | |
parent | a73981e95b53d62cc7e42ce54e54473f3758d2e7 (diff) | |
download | mediapointer-dvb-s2-dbc0579cac0ed9f9af0bcf361a5c3fc56f4f8395.tar.gz mediapointer-dvb-s2-dbc0579cac0ed9f9af0bcf361a5c3fc56f4f8395.tar.bz2 |
merge: http://linuxtv.org/hg/~mkrufky/v4l-dvb
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/tuner-core.c')
-rw-r--r-- | linux/drivers/media/video/tuner-core.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c index 02fb067e2..e7bc60a5e 100644 --- a/linux/drivers/media/video/tuner-core.c +++ b/linux/drivers/media/video/tuner-core.c @@ -903,7 +903,11 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,14) +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20) +static int tuner_suspend(struct i2c_client *c, pm_message_t state) +#else static int tuner_suspend(struct device *dev, pm_message_t state) +#endif #else #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,13) static int tuner_suspend(struct device *dev, pm_message_t state, u32 level) @@ -912,7 +916,9 @@ static int tuner_suspend(struct device *dev, u32 state, u32 level) #endif #endif { +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,20) struct i2c_client *c = container_of (dev, struct i2c_client, dev); +#endif struct tuner *t = i2c_get_clientdata (c); tuner_dbg ("suspend\n"); @@ -921,12 +927,18 @@ static int tuner_suspend(struct device *dev, u32 state, u32 level) } #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,14) +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20) +static int tuner_resume(struct i2c_client *c) +#else static int tuner_resume(struct device *dev) +#endif #else static int tuner_resume(struct device *dev, u32 level) #endif { +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,20) struct i2c_client *c = container_of (dev, struct i2c_client, dev); +#endif struct tuner *t = i2c_get_clientdata (c); tuner_dbg ("resume\n"); @@ -955,13 +967,19 @@ static struct i2c_driver driver = { .attach_adapter = tuner_probe, .detach_client = tuner_detach, .command = tuner_command, +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20) + .suspend = tuner_suspend, + .resume = tuner_resume, +#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) .driver = { #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) .name = "tuner", #endif +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,20) .suspend = tuner_suspend, .resume = tuner_resume, +#endif }, #endif }; |