Skip to contentSkip to conversation

v4l: fwnode: Use correct argument type for nop v4l2_flash_init()

PATCH New Sakari Ailus 2 participants 2 messages May 29, 2017 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 v4l: fwnode: Use correct argument type for nop v4l2_flash_init()

The device_node -> fwnode change didn't reach the nop implementation of v4l2_flash_init(), do that change now.

Fixes ("v4l: flash led class: Use fwnode_handle instead of device_node in init")
---
 include/media/v4l2-flash-led-class.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/media/v4l2-flash-led-class.h +1 -1
index 5695853..f9dcd54 100644
@@ -138,7 +138,7 @@ void v4l2_flash_release(struct v4l2_flash *v4l2_flash);
 
 #else
 static inline struct v4l2_flash *v4l2_flash_init(
-	struct device *dev, struct device_node *of_node,
+	struct device *dev, struct fwnode_handle *fwn,
 	struct led_classdev_flash *fled_cdev,
 	struct led_classdev_flash *iled_cdev,
 	const struct v4l2_flash_ops *ops,
Signature · 1 line
2.1.4
#1 lore raw
reproduce:

Hi Sakari,

[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on v4.12-rc3 next-20170529]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Sakari-Ailus/v4l-fwnode-Use-correct-argument-type-for-nop-v4l2_flash_init/20170529-181025
base:   git://linuxtv.org/media_tree.git master
config: x86_64-randconfig-r0-05281518 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

drivers//leds/leds-aat1290.c: In function 'aat1290_led_probe':

>> drivers//leds/leds-aat1290.c:506:41: error: passing argument 2 of 'v4l2_flash_init' from incompatible pointer type [-Werror=incompatible-pointer-types]
     led->v4l2_flash = v4l2_flash_init(dev, sub_node, fled_cdev, NULL,
                                            ^~~~~~~~
   In file included from drivers//leds/leds-aat1290.c:23:0:
   include/media/v4l2-flash-led-class.h:140:34: note: expected 'struct fwnode_handle *' but argument is of type 'struct device_node *'
    static inline struct v4l2_flash *v4l2_flash_init(
                                     ^~~~~~~~~~~~~~~

cc1: some warnings being treated as errors

vim +/v4l2_flash_init +506 drivers//leds/leds-aat1290.c

49c34b8e Jacek Anaszewski 2015-04-30  500  	if (ret < 0)
49c34b8e Jacek Anaszewski 2015-04-30  501  		goto err_flash_register;
49c34b8e Jacek Anaszewski 2015-04-30  502  
ac69b903 Jacek Anaszewski 2015-06-19  503  	aat1290_init_v4l2_flash_config(led, &led_cfg, &v4l2_sd_cfg);
ac69b903 Jacek Anaszewski 2015-06-19  504  
ac69b903 Jacek Anaszewski 2015-06-19  505  	/* Create V4L2 Flash subdev. */
ac69b903 Jacek Anaszewski 2015-06-19 @506  	led->v4l2_flash = v4l2_flash_init(dev, sub_node, fled_cdev, NULL,
ac69b903 Jacek Anaszewski 2015-06-19  507  					  &v4l2_flash_ops, &v4l2_sd_cfg);
ac69b903 Jacek Anaszewski 2015-06-19  508  	if (IS_ERR(led->v4l2_flash)) {
ac69b903 Jacek Anaszewski 2015-06-19  509  		ret = PTR_ERR(led->v4l2_flash);

:::::: The code at line 506 was first introduced by commit
:::::: ac69b9038f8214e2a8ee0eb3a113af473a7518e4 leds: aat1290: add support for V4L2 Flash sub-device

:::::: TO: Jacek Anaszewski <[email protected]> :::::: CC: Bryan Wu <[email protected]>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation