summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tuner-core.c
diff options
context:
space:
mode:
authorHans Verkuil <devnull@localhost>2005-11-27 00:31:22 +0000
committerHans Verkuil <devnull@localhost>2005-11-27 00:31:22 +0000
commitb378c9b9b9480ef6352bc5f37e30369dda75625e (patch)
tree1c54fb20bc99627ed4ab57d1456aaa5818ceed1b /linux/drivers/media/video/tuner-core.c
parentecc615b56853187aabee05db0948691dec891f45 (diff)
downloadmediapointer-dvb-s2-b378c9b9b9480ef6352bc5f37e30369dda75625e.tar.gz
mediapointer-dvb-s2-b378c9b9b9480ef6352bc5f37e30369dda75625e.tar.bz2
Fix suspend/resume 2.6.15 compile warnings
Fix suspend/resume 2.6.15 compile warnings. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/video/tuner-core.c')
-rw-r--r--linux/drivers/media/video/tuner-core.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c
index c459a42f2..e40a7a750 100644
--- a/linux/drivers/media/video/tuner-core.c
+++ b/linux/drivers/media/video/tuner-core.c
@@ -1,5 +1,5 @@
/*
- * $Id: tuner-core.c,v 1.85 2005/11/09 00:17:20 mchehab Exp $
+ * $Id: tuner-core.c,v 1.86 2005/11/27 00:31:22 hverkuil Exp $
*
* i2c tv tuner chip device driver
* core core, i.e. kernel interfaces, registering and so on
@@ -732,7 +732,10 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
return 0;
}
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,13)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,14)
+static int tuner_suspend(struct device *dev, pm_message_t state)
+#elif LINUX_VERSION_CODE > KERNEL_VERSION(2,6,13)
static int tuner_suspend(struct device *dev, pm_message_t state, u32 level)
#else
static int tuner_suspend(struct device *dev, u32 state, u32 level)
@@ -746,7 +749,11 @@ static int tuner_suspend(struct device *dev, u32 state, u32 level)
return 0;
}
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,14)
+static int tuner_resume(struct device *dev)
+#else
static int tuner_resume(struct device *dev, u32 level)
+#endif
{
struct i2c_client *c = container_of (dev, struct i2c_client, dev);
struct tuner *t = i2c_get_clientdata (c);
@@ -756,6 +763,7 @@ static int tuner_resume(struct device *dev, u32 level)
set_freq(c, t->freq);
return 0;
}
+#endif
/* ----------------------------------------------------------------------- */
@@ -767,10 +775,12 @@ static struct i2c_driver driver = {
.attach_adapter = tuner_probe,
.detach_client = tuner_detach,
.command = tuner_command,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
.driver = {
.suspend = tuner_suspend,
.resume = tuner_resume,
},
+#endif
};
static struct i2c_client client_template = {
.name = "(tuner unset)",