Skip to contentSkip to conversation

next: media: cx231xx: add #ifdef to fix compile error

PATCH In review Okash Khawaja 2 participants 5 messages Dec 22, 2015 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 next: media: cx231xx: add #ifdef to fix compile error

Compiling linux-next gave this warning:

drivers/media/usb/cx231xx/cx231xx-cards.c: In function ‘cx231xx_usb_probe’:
drivers/media/usb/cx231xx/cx231xx-cards.c:1754:36: error: ‘struct cx231xx’ has no member named ‘media_dev’
retval = media_device_register(dev->media_dev);

Looking at the refactoring in past two commits, following seems like a decent fix, i.e. to surround dev->media_dev by #ifdef CONFIG_MEDIA_CONTROLLER.

---
 drivers/media/usb/cx231xx/cx231xx-cards.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/media/usb/cx231xx/cx231xx-cards.c +2 -0
index 35692d1..220a5db 100644
@@ -1751,7 +1751,9 @@ static int cx231xx_usb_probe(struct usb_interface *interface,
 	if (retval < 0)
 		goto done;
 
+#ifdef CONFIG_MEDIA_CONTROLLER
 	retval = media_device_register(dev->media_dev);
+#endif
 
 done:
 	if (retval < 0)
Signature · 1 line
2.5.2
#1 lore raw

Hello Okash,

Quoted 23 lines · Okash Khawaja

Compiling linux-next gave this warning:

drivers/media/usb/cx231xx/cx231xx-cards.c: In function ‘cx231xx_usb_probe’:
drivers/media/usb/cx231xx/cx231xx-cards.c:1754:36: error: ‘struct cx231xx’ has no member named ‘media_dev’
retval = media_device_register(dev->media_dev);

Looking at the refactoring in past two commits, following seems like a decent fix, i.e. to surround dev->media_dev by #ifdef CONFIG_MEDIA_CONTROLLER.

---
 drivers/media/usb/cx231xx/cx231xx-cards.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/media/usb/cx231xx/cx231xx-cards.c +0 -0
index 35692d1..220a5db 100644

drivers/media/usb/cx231xx/cx231xx-cards.c static int cx231xx_usb_probe(struct usb_interface *interface, · line 1759

Quoted 9 lines
drivers/media/usb/cx231xx/cx231xx-cards.c +2 -0
@@ -1751,7 +1751,9 @@ static int cx231xx_usb_probe(struct usb_interface *interface,
 	if (retval < 0)
 		goto done;
 
+#ifdef CONFIG_MEDIA_CONTROLLER
 	retval = media_device_register(dev->media_dev);
+#endif
 
 done:
 	if (retval < 0)

Thanks for your patch, I've posted the same fix already:

https://lkml.org/lkml/2015/12/21/270

Best regards,

Signature · 3 lines
Javier Martinez Canillas
Open Source Group
Samsung Research America
#2 lore raw
Quoted 38 lines · Javier Martinez Canillas

Hello Okash,

Quoted 23 lines · Okash Khawaja

Compiling linux-next gave this warning:

drivers/media/usb/cx231xx/cx231xx-cards.c: In function ‘cx231xx_usb_probe’:
drivers/media/usb/cx231xx/cx231xx-cards.c:1754:36: error: ‘struct cx231xx’ has no member named ‘media_dev’
retval = media_device_register(dev->media_dev);

Looking at the refactoring in past two commits, following seems like a decent fix, i.e. to surround dev->media_dev by #ifdef CONFIG_MEDIA_CONTROLLER.

---
 drivers/media/usb/cx231xx/cx231xx-cards.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/media/usb/cx231xx/cx231xx-cards.c +0 -0
index 35692d1..220a5db 100644

drivers/media/usb/cx231xx/cx231xx-cards.c static int cx231xx_usb_probe(struct usb_interface *interface, · line 1759

Quoted 9 lines
drivers/media/usb/cx231xx/cx231xx-cards.c +2 -0
@@ -1751,7 +1751,9 @@ static int cx231xx_usb_probe(struct usb_interface *interface,
 	if (retval < 0)
 		goto done;
 
+#ifdef CONFIG_MEDIA_CONTROLLER
 	retval = media_device_register(dev->media_dev);
+#endif
 
 done:
 	if (retval < 0)

Thanks for your patch, I've posted the same fix already:

Quoted 7 lines

https://lkml.org/lkml/2015/12/21/270

Best regards,

Signature · 3 lines
Javier Martinez Canillas
Open Source Group
Samsung Research America

Cool. There was another similar compile error

https://lkml.org/lkml/2015/12/22/196

Thanks,
Okash

#3 lore raw

Hello Okash,

On 12/22/2015 10:00 AM, Okash Khawaja wrote:

[snip]

Quoted 5 lines

Cool. There was another similar compile error

https://lkml.org/lkml/2015/12/22/196

Yes and you can see in that thread that I also mention that was fixed already :)

Quoted 3 lines

Thanks,
Okash

Best regards,

Signature · 3 lines
Javier Martinez Canillas
Open Source Group
Samsung Research America
#4 lore raw
Quoted 14 lines · Javier Martinez Canillas

Hello Okash,

On 12/22/2015 10:00 AM, Okash Khawaja wrote:

[snip]

Quoted 4 lines

Cool. There was another similar compile error

https://lkml.org/lkml/2015/12/22/196

Quoted 11 lines

Yes and you can see in that thread that I also mention that was fixed already :)

Quoted 2 lines

Thanks,
Okash

Best regards,

Signature · 3 lines
Javier Martinez Canillas
Open Source Group
Samsung Research America

Of course! I'm blind.