Skip to contentSkip to conversation

Fix notify callback prototype

PATCH In review Jean Delvare 2 participants 2 messages Mar 15, 2009 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix notify callback prototype

I see the following warning when building the zoran driver:
v4l/zoran_card.c: In function 'zoran_probe':
v4l/zoran_card.c:1243: warning: assignment from incompatible pointer type

Fixing the notify callback prototype solves it.

Cc Hans Verkuil <[email protected]>
Cc Trent Piepho <[email protected]>
---
 linux/drivers/media/video/zoran/zoran_card.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
linux/drivers/media/video/zoran/zoran_card.c +1 -2
@@ -1197,7 +1197,7 @@ zoran_setup_videocodec (struct zoran *zr
 	return m;
 }
 
-static int zoran_subdev_notify(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
+static void zoran_subdev_notify(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
 {
 	struct zoran *zr = to_zoran(sd->v4l2_dev);
 
@@ -1207,7 +1207,6 @@ static int zoran_subdev_notify(struct v4
 		GPIO(zr, 7, 0);
 	else if (cmd == BT819_FIFO_RESET_HIGH)
 		GPIO(zr, 7, 1);
-	return 0;
 }
 
 /*
Signature · 1 line
Jean Delvare
#1 lore raw
Quoted 27 lines · On Sunday 15 March 2009 10:20:45 Jean Delvare wrote:

I see the following warning when building the zoran driver:
v4l/zoran_card.c: In function 'zoran_probe':
v4l/zoran_card.c:1243: warning: assignment from incompatible pointer type

Fixing the notify callback prototype solves it.

Cc Hans Verkuil <[email protected]>
Cc Trent Piepho <[email protected]>
---
 linux/drivers/media/video/zoran/zoran_card.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- v4l-dvb.orig/linux/drivers/media/video/zoran/zoran_card.c 2009-03-15
10:09:47.000000000 +0100 +++
v4l-dvb/linux/drivers/media/video/zoran/zoran_card.c 2009-03-15
10:17:26.000000000 +0100 @@ -1197,7 +1197,7 @@ zoran_setup_videocodec (struct zoran *zr

linux/drivers/media/video/zoran/zoran_card.c +0 -1
 	return m;
 }
 
-static int zoran_subdev_notify(struct v4l2_subdev *sd, unsigned int cmd,

void *arg) +static void zoran_subdev_notify(struct v4l2_subdev *sd, unsigned int cmd, void *arg) {

linux/drivers/media/video/zoran/zoran_card.c +0 -0
 	struct zoran *zr = to_zoran(sd->v4l2_dev);

linux/drivers/media/video/zoran/zoran_card.c static int zoran_subdev_notify(struct v4 · line 1212

Quoted 7 lines
linux/drivers/media/video/zoran/zoran_card.c +0 -1
@@ -1207,7 +1207,6 @@ static int zoran_subdev_notify(struct v4
 		GPIO(zr, 7, 0);
 	else if (cmd == BT819_FIFO_RESET_HIGH)
 		GPIO(zr, 7, 1);
-	return 0;
 }
 
 /*

And this fix is also pending in my tree :-)

Regards,

Hans

Signature · 1 line
Hans Verkuil - video4linux developer - sponsored by TANDBERG