drivers/media/i2c/max9286.c:1033:6: error: 'struct gpio_chip' has no member named 'of_node'

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

 



Hi Kieran,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   06a4ec1d9dc652e17ee3ac2ceb6c7cf6c2b75cdd
commit: 66d8c9d2422da21ed41f75c03ba0685987b65fe0 media: i2c: Add MAX9286 driver
date:   4 weeks ago
config: nios2-randconfig-p002-20200818 (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 66d8c9d2422da21ed41f75c03ba0685987b65fe0
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   drivers/media/i2c/max9286.c: In function 'max9286_register_gpio':
>> drivers/media/i2c/max9286.c:1033:6: error: 'struct gpio_chip' has no member named 'of_node'
    1033 |  gpio->of_node = dev->of_node;
         |      ^~

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=66d8c9d2422da21ed41f75c03ba0685987b65fe0
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 66d8c9d2422da21ed41f75c03ba0685987b65fe0
vim +1033 drivers/media/i2c/max9286.c

  1022	
  1023	static int max9286_register_gpio(struct max9286_priv *priv)
  1024	{
  1025		struct device *dev = &priv->client->dev;
  1026		struct gpio_chip *gpio = &priv->gpio;
  1027		int ret;
  1028	
  1029		/* Configure the GPIO */
  1030		gpio->label = dev_name(dev);
  1031		gpio->parent = dev;
  1032		gpio->owner = THIS_MODULE;
> 1033		gpio->of_node = dev->of_node;
  1034		gpio->ngpio = 2;
  1035		gpio->base = -1;
  1036		gpio->set = max9286_gpio_set;
  1037		gpio->get = max9286_gpio_get;
  1038		gpio->can_sleep = true;
  1039	
  1040		/* GPIO values default to high */
  1041		priv->gpio_state = BIT(0) | BIT(1);
  1042	
  1043		ret = devm_gpiochip_add_data(dev, gpio, priv);
  1044		if (ret)
  1045			dev_err(dev, "Unable to create gpio_chip\n");
  1046	
  1047		return ret;
  1048	}
  1049	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux