[gpio:gpio-driver-h 15/25] drivers//gpio/gpio-sch311x.c:268:31: error: 'sch311x_get_direction' undeclared; did you mean 'sch311x_gpio_get_direction'?

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git gpio-driver-h
head:   915c04be5ba60b3e285f361a38c2c85f10d934d9
commit: 316724ca535fdd1494c7e284166a3297c6511ad4 [15/25] gpio: sch311x: Implement .get_direction()
config: i386-randconfig-x000-201825 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        git checkout 316724ca535fdd1494c7e284166a3297c6511ad4
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers//gpio/gpio-sch311x.c: In function 'sch311x_gpio_probe':
>> drivers//gpio/gpio-sch311x.c:268:31: error: 'sch311x_get_direction' undeclared (first use in this function); did you mean 'sch311x_gpio_get_direction'?
      block->chip.get_direction = sch311x_get_direction;
                                  ^~~~~~~~~~~~~~~~~~~~~
                                  sch311x_gpio_get_direction
   drivers//gpio/gpio-sch311x.c:268:31: note: each undeclared identifier is reported only once for each function it appears in
   At top level:
   drivers//gpio/gpio-sch311x.c:224:12: warning: 'sch311x_gpio_get_direction' defined but not used [-Wunused-function]
    static int sch311x_gpio_get_direction(struct gpio_chip *chip, unsigned offset)
               ^~~~~~~~~~~~~~~~~~~~~~~~~~

vim +268 drivers//gpio/gpio-sch311x.c

   235	
   236	static int sch311x_gpio_probe(struct platform_device *pdev)
   237	{
   238		struct sch311x_pdev_data *pdata = dev_get_platdata(&pdev->dev);
   239		struct sch311x_gpio_priv *priv;
   240		struct sch311x_gpio_block *block;
   241		int err, i;
   242	
   243		/* we can register all GPIO data registers at once */
   244		if (!devm_request_region(&pdev->dev, pdata->runtime_reg + GP1, 6,
   245			DRV_NAME)) {
   246			dev_err(&pdev->dev, "Failed to request region 0x%04x-0x%04x.\n",
   247				pdata->runtime_reg + GP1, pdata->runtime_reg + GP1 + 5);
   248			return -EBUSY;
   249		}
   250	
   251		priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
   252		if (!priv)
   253			return -ENOMEM;
   254	
   255		platform_set_drvdata(pdev, priv);
   256	
   257		for (i = 0; i < ARRAY_SIZE(priv->blocks); i++) {
   258			block = &priv->blocks[i];
   259	
   260			spin_lock_init(&block->lock);
   261	
   262			block->chip.label = DRV_NAME;
   263			block->chip.owner = THIS_MODULE;
   264			block->chip.request = sch311x_gpio_request;
   265			block->chip.free = sch311x_gpio_free;
   266			block->chip.direction_input = sch311x_gpio_direction_in;
   267			block->chip.direction_output = sch311x_gpio_direction_out;
 > 268			block->chip.get_direction = sch311x_get_direction;
   269			block->chip.get = sch311x_gpio_get;
   270			block->chip.set = sch311x_gpio_set;
   271			block->chip.ngpio = 8;
   272			block->chip.parent = &pdev->dev;
   273			block->chip.base = sch311x_gpio_blocks[i].base;
   274			block->config_regs = sch311x_gpio_blocks[i].config_regs;
   275			block->data_reg = sch311x_gpio_blocks[i].data_reg;
   276			block->runtime_reg = pdata->runtime_reg;
   277	
   278			err = gpiochip_add_data(&block->chip, block);
   279			if (err < 0) {
   280				dev_err(&pdev->dev,
   281					"Could not register gpiochip, %d\n", err);
   282				goto exit_err;
   283			}
   284			dev_info(&pdev->dev,
   285				 "SMSC SCH311x GPIO block %d registered.\n", i);
   286		}
   287	
   288		return 0;
   289	
   290	exit_err:
   291		/* release already registered chips */
   292		for (--i; i >= 0; i--)
   293			gpiochip_remove(&priv->blocks[i].chip);
   294		return err;
   295	}
   296	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux