Re: [PATCH] USB: bcma: switch to GPIO descriptor for power control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Rafał,

[auto build test ERROR on usb/usb-next -- if it's inappropriate base, please suggest rules for selecting the more suitable base]

url:    https://github.com/0day-ci/linux/commits/Rafa-Mi-ecki/USB-bcma-switch-to-GPIO-descriptor-for-power-control/20151101-155324
config: x86_64-randconfig-x010-201544 (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All error/warnings (new ones prefixed by >>):

   drivers/usb/host/bcma-hcd.c: In function 'bcma_hci_platform_power_gpio':
>> drivers/usb/host/bcma-hcd.c:237:2: error: implicit declaration of function 'gpiod_set_value' [-Werror=implicit-function-declaration]
     gpiod_set_value(usb_dev->gpio_desc, val);
     ^
   drivers/usb/host/bcma-hcd.c: In function 'bcma_hcd_probe':
>> drivers/usb/host/bcma-hcd.c:312:24: error: implicit declaration of function 'devm_get_gpiod_from_child' [-Werror=implicit-function-declaration]
      usb_dev->gpio_desc = devm_get_gpiod_from_child(&dev->dev, "vcc",
                           ^
>> drivers/usb/host/bcma-hcd.c:312:22: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
      usb_dev->gpio_desc = devm_get_gpiod_from_child(&dev->dev, "vcc",
                         ^
>> drivers/usb/host/bcma-hcd.c:315:3: error: implicit declaration of function 'gpiod_direction_output' [-Werror=implicit-function-declaration]
      gpiod_direction_output(usb_dev->gpio_desc, 1);
      ^
   cc1: some warnings being treated as errors

vim +/gpiod_set_value +237 drivers/usb/host/bcma-hcd.c

   231	{
   232		struct bcma_hcd_device *usb_dev = bcma_get_drvdata(dev);
   233	
   234		if (IS_ERR_OR_NULL(usb_dev->gpio_desc))
   235			return;
   236	
 > 237		gpiod_set_value(usb_dev->gpio_desc, val);
   238	}
   239	
   240	static const struct usb_ehci_pdata ehci_pdata = {
   241	};
   242	
   243	static const struct usb_ohci_pdata ohci_pdata = {
   244	};
   245	
   246	static struct platform_device *bcma_hcd_create_pdev(struct bcma_device *dev, bool ohci, u32 addr)
   247	{
   248		struct platform_device *hci_dev;
   249		struct resource hci_res[2];
   250		int ret;
   251	
   252		memset(hci_res, 0, sizeof(hci_res));
   253	
   254		hci_res[0].start = addr;
   255		hci_res[0].end = hci_res[0].start + 0x1000 - 1;
   256		hci_res[0].flags = IORESOURCE_MEM;
   257	
   258		hci_res[1].start = dev->irq;
   259		hci_res[1].flags = IORESOURCE_IRQ;
   260	
   261		hci_dev = platform_device_alloc(ohci ? "ohci-platform" :
   262						"ehci-platform" , 0);
   263		if (!hci_dev)
   264			return ERR_PTR(-ENOMEM);
   265	
   266		hci_dev->dev.parent = &dev->dev;
   267		hci_dev->dev.dma_mask = &hci_dev->dev.coherent_dma_mask;
   268	
   269		ret = platform_device_add_resources(hci_dev, hci_res,
   270						    ARRAY_SIZE(hci_res));
   271		if (ret)
   272			goto err_alloc;
   273		if (ohci)
   274			ret = platform_device_add_data(hci_dev, &ohci_pdata,
   275						       sizeof(ohci_pdata));
   276		else
   277			ret = platform_device_add_data(hci_dev, &ehci_pdata,
   278						       sizeof(ehci_pdata));
   279		if (ret)
   280			goto err_alloc;
   281		ret = platform_device_add(hci_dev);
   282		if (ret)
   283			goto err_alloc;
   284	
   285		return hci_dev;
   286	
   287	err_alloc:
   288		platform_device_put(hci_dev);
   289		return ERR_PTR(ret);
   290	}
   291	
   292	static int bcma_hcd_probe(struct bcma_device *dev)
   293	{
   294		int err;
   295		u32 ohci_addr;
   296		struct bcma_hcd_device *usb_dev;
   297		struct bcma_chipinfo *chipinfo;
   298	
   299		chipinfo = &dev->bus->chipinfo;
   300	
   301		/* TODO: Probably need checks here; is the core connected? */
   302	
   303		if (dma_set_mask_and_coherent(dev->dma_dev, DMA_BIT_MASK(32)))
   304			return -EOPNOTSUPP;
   305	
   306		usb_dev = devm_kzalloc(&dev->dev, sizeof(struct bcma_hcd_device),
   307				       GFP_KERNEL);
   308		if (!usb_dev)
   309			return -ENOMEM;
   310	
   311		if (dev->dev.of_node)
 > 312			usb_dev->gpio_desc = devm_get_gpiod_from_child(&dev->dev, "vcc",
   313								       &dev->dev.of_node->fwnode);
   314		if (!IS_ERR_OR_NULL(usb_dev->gpio_desc))
 > 315			gpiod_direction_output(usb_dev->gpio_desc, 1);
   316	
   317		switch (dev->id.id) {
   318		case BCMA_CORE_NS_USB20:

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

Attachment: .config.gz
Description: Binary data


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux