[gpio:gpio-descriptors-extcon-cleanup 2/5] drivers/extcon/extcon-gpio.c:91:11: error: 'struct gpio_extcon_data' has no member named 'irq_flags'

[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-descriptors-extcon-cleanup
head:   11f3581747f464e24fae02acd34c52827dc7e9c8
commit: 83d3fa74649fa1e044c708d5a9028f02ffd432bc [2/5] extcon: gpio: Request reasonable interrupts
config: i386-randconfig-x008-201816 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        git checkout 83d3fa74649fa1e044c708d5a9028f02ffd432bc
        # save the attached .config to linux build tree
        make ARCH=i386 

Note: the gpio/gpio-descriptors-extcon-cleanup HEAD 11f3581747f464e24fae02acd34c52827dc7e9c8 builds fine.
      It only hurts bisectibility.

All errors (new ones prefixed by >>):

   drivers/extcon/extcon-gpio.c: In function 'gpio_extcon_probe':
>> drivers/extcon/extcon-gpio.c:91:11: error: 'struct gpio_extcon_data' has no member named 'irq_flags'
     if (!data->irq_flags || data->extcon_id > EXTCON_NONE)
              ^~

vim +91 drivers/extcon/extcon-gpio.c

be48308a drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20   71  
44f34fd4 drivers/extcon/extcon-gpio.c Bill Pemberton 2012-11-19   72  static int gpio_extcon_probe(struct platform_device *pdev)
be48308a drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20   73  {
60f9b9e6 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29   74  	struct gpio_extcon_data *data;
d368e7de drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   75  	struct device *dev = &pdev->dev;
83d3fa74 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24   76  	unsigned long irq_flags;
83d3fa74 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24   77  	int irq;
1073514b drivers/extcon/extcon-gpio.c Guenter Roeck  2013-08-29   78  	int ret;
be48308a drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20   79  
d368e7de drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   80  	data = devm_kzalloc(dev, sizeof(struct gpio_extcon_data), GFP_KERNEL);
60f9b9e6 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29   81  	if (!data)
be48308a drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20   82  		return -ENOMEM;
a62300d9 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   83  
a62300d9 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   84  	/*
a62300d9 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   85  	 * FIXME: extcon_id represents the unique identifier of external
a62300d9 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   86  	 * connectors such as EXTCON_USB, EXTCON_DISP_HDMI and so on. extcon_id
a62300d9 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   87  	 * is necessary to register the extcon device. But, it's not yet
a62300d9 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   88  	 * developed to get the extcon id from device-tree or others.
a62300d9 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   89  	 * On later, it have to be solved.
a62300d9 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   90  	 */
a62300d9 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12  @91  	if (!data->irq_flags || data->extcon_id > EXTCON_NONE)
a62300d9 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   92  		return -EINVAL;
60cd62d4 drivers/extcon/extcon-gpio.c Chanwoo Choi   2014-04-21   93  
d368e7de drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   94  	data->gpiod = devm_gpiod_get(dev, "extcon", GPIOD_IN);
d368e7de drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   95  	if (IS_ERR(data->gpiod))
d368e7de drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   96  		return PTR_ERR(data->gpiod);
83d3fa74 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24   97  	irq = gpiod_to_irq(data->gpiod);
83d3fa74 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24   98  	if (irq <= 0)
83d3fa74 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24   99  		return irq;
83d3fa74 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  100  
83d3fa74 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  101  	/*
83d3fa74 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  102  	 * It is unlikely that this is an acknowledged interrupt that goes
83d3fa74 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  103  	 * away after handling, what we are looking for are falling edges
83d3fa74 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  104  	 * if the signal is active low, and rising edges if the signal is
83d3fa74 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  105  	 * active high.
83d3fa74 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  106  	 */
83d3fa74 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  107  	if (gpiod_is_active_low(data->gpiod))
83d3fa74 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  108  		irq_flags = IRQF_TRIGGER_FALLING;
83d3fa74 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  109  	else
83d3fa74 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  110  		irq_flags = IRQF_TRIGGER_RISING;
4288d9b8 drivers/extcon/extcon-gpio.c Guenter Roeck  2013-11-22  111  
de992acb drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  112  	/* Allocate the memory of extcon devie and register extcon device */
d368e7de drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12  113  	data->edev = devm_extcon_dev_allocate(dev, &data->extcon_id);
de992acb drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  114  	if (IS_ERR(data->edev)) {
d368e7de drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12  115  		dev_err(dev, "failed to allocate extcon device\n");
de992acb drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  116  		return -ENOMEM;
338de0ca drivers/extcon/extcon-gpio.c Guenter Roeck  2013-09-10  117  	}
be48308a drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  118  
d368e7de drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12  119  	ret = devm_extcon_dev_register(dev, data->edev);
be48308a drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  120  	if (ret < 0)
01eaf245 drivers/extcon/extcon_gpio.c Axel Lin       2012-06-16  121  		return ret;
be48308a drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  122  
60f9b9e6 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29  123  	INIT_DELAYED_WORK(&data->work, gpio_extcon_work);
be48308a drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  124  
de992acb drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  125  	/*
b51b3870 drivers/extcon/extcon-gpio.c Moritz Fischer 2015-12-23  126  	 * Request the interrupt of gpio to detect whether external connector
de992acb drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  127  	 * is attached or detached.
de992acb drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  128  	 */
83d3fa74 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  129  	ret = devm_request_any_context_irq(dev, irq,
83d3fa74 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  130  					gpio_irq_handler, irq_flags,
60f9b9e6 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29  131  					pdev->name, data);
be48308a drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  132  	if (ret < 0)
d92c2f12 drivers/extcon/extcon-gpio.c Sangjung Woo   2014-04-21  133  		return ret;
be48308a drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  134  
60f9b9e6 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29  135  	platform_set_drvdata(pdev, data);
be48308a drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  136  	/* Perform initial detection */
60f9b9e6 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29  137  	gpio_extcon_work(&data->work.work);
be48308a drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  138  
be48308a drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  139  	return 0;
be48308a drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  140  }
be48308a drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  141  

:::::: The code at line 91 was first introduced by commit
:::::: a62300d99f15c4be7edafbbc2ade0246ec853778 extcon: gpio: Move platform data into state container

:::::: TO: Linus Walleij <linus.walleij@xxxxxxxxxx>
:::::: CC: Chanwoo Choi <cw00.choi@xxxxxxxxxxx>

---
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