mfd: intel_soc_pmic_core: Remove unnecessary function
PATCH 1/1 mfd: intel_soc_pmic_core: Remove unnecessary function
Since commit 845c877009cf ("i2c / ACPI: Assign IRQ for devices that have GpioInt automatically") I2C core assigns interrupt line to I2C slave devices with regarding to GpioInt() resources.
There is no need to repeat this in the driver.
--- drivers/mfd/intel_soc_pmic_core.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-)
drivers/mfd/intel_soc_pmic_core.c +1 -24
@@ -44,22 +44,6 @@ static struct pwm_lookup crc_pwm_lookup[] = { PWM_LOOKUP("crystal_cove_pwm", 0, "0000:00:02.0", "pwm_backlight", 0, PWM_POLARITY_NORMAL), }; -static int intel_soc_pmic_find_gpio_irq (struct device *dev) -{ -struct gpio_desc *desc; -int irq; - - desc =devm_gpiod_get_index (dev,"intel_soc_pmic" ,0 ,GPIOD_IN ); -if (IS_ERR (desc)) -return PTR_ERR (desc); - - irq =gpiod_to_irq (desc); -if (irq <0 ) -dev_warn (dev,"Can't get irq: %d\n" , irq); - -return irq; -} -static int intel_soc_pmic_i2c_probe (struct i2c_client *i2c,const struct i2c_device_id *i2c_id) {
@@ -83,14 +67,7 @@ static int intel_soc_pmic_i2c_probe(struct i2c_client *i2c,dev_set_drvdata (dev, pmic); pmic->regmap =devm_regmap_init_i2c (i2c, config->regmap_config); - -/* -* On some boards the PMIC interrupt may come from a GPIO line. Try to -* lookup the ACPI table for a such connection and setup a GPIO -* interrupt if it exists. Otherwise use the IRQ provided by I2C -*/ - irq =intel_soc_pmic_find_gpio_irq (dev); - pmic->irq = (irq <0 ) ? i2c->irq : irq; + pmic->irq = i2c->irq; ret = regmap_add_irq_chip(pmic->regmap, pmic->irq, config->irq_flags | IRQF_ONESHOT,
Signature · 1 line
2.11.0
kbuild test robot
build botreproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree…
Hi Andy,
[auto build test WARNING on ljones-mfd/for-mfd-next]
[also build test WARNING on v4.10 next-20170220]
[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/Andy-Shevchenko/mfd-intel_soc_pmic_core-Remove-unnecessary-function/20170221-034944 base: https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-next config: openrisc-allyesconfig (attached as .config) compiler: or32-linux-gcc (GCC) 4.5.1-or32-1.0rc1
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=openrisc
All warnings (new ones prefixed by >>):
drivers/mfd/intel_soc_pmic_core.c: In function 'intel_soc_pmic_i2c_probe':
>> drivers/mfd/intel_soc_pmic_core.c:55:6: warning: unused variable 'irq'
vim +/irq +55 drivers/mfd/intel_soc_pmic_core.c
61dd2ca2 Shobhit Kumar 2015-06-26 39 },
61dd2ca2 Shobhit Kumar 2015-06-26 40 };
61dd2ca2 Shobhit Kumar 2015-06-26 41
a3aa9a93 Shobhit Kumar 2015-06-26 42 /* PWM consumed by the Intel GFX */
a3aa9a93 Shobhit Kumar 2015-06-26 43 static struct pwm_lookup crc_pwm_lookup[] = {
a3aa9a93 Shobhit Kumar 2015-06-26 44 PWM_LOOKUP("crystal_cove_pwm", 0, "0000:00:02.0", "pwm_backlight", 0, PWM_POLARITY_NORMAL),
a3aa9a93 Shobhit Kumar 2015-06-26 45 };
a3aa9a93 Shobhit Kumar 2015-06-26 46
51652384 Zhu, Lejun 2014-06-03 47 static int intel_soc_pmic_i2c_probe(struct i2c_client *i2c,
51652384 Zhu, Lejun 2014-06-03 48 const struct i2c_device_id *i2c_id)
51652384 Zhu, Lejun 2014-06-03 49 {
51652384 Zhu, Lejun 2014-06-03 50 struct device *dev = &i2c->dev;
51652384 Zhu, Lejun 2014-06-03 51 const struct acpi_device_id *id;
51652384 Zhu, Lejun 2014-06-03 52 struct intel_soc_pmic_config *config;
51652384 Zhu, Lejun 2014-06-03 53 struct intel_soc_pmic *pmic;
51652384 Zhu, Lejun 2014-06-03 54 int ret;
51652384 Zhu, Lejun 2014-06-03 @55 int irq;
51652384 Zhu, Lejun 2014-06-03 56
51652384 Zhu, Lejun 2014-06-03 57 id = acpi_match_device(dev->driver->acpi_match_table, dev);
51652384 Zhu, Lejun 2014-06-03 58 if (!id || !id->driver_data)
51652384 Zhu, Lejun 2014-06-03 59 return -ENODEV;
51652384 Zhu, Lejun 2014-06-03 60
51652384 Zhu, Lejun 2014-06-03 61 config = (struct intel_soc_pmic_config *)id->driver_data;
51652384 Zhu, Lejun 2014-06-03 62
51652384 Zhu, Lejun 2014-06-03 63 pmic = devm_kzalloc(dev, sizeof(*pmic), GFP_KERNEL);:::::: The code at line 55 was first introduced by commit
:::::: 5165238460068e53c740eaa621ebb6623dc4a50d mfd: intel_soc_pmic: Core driver
:::::: TO: Zhu, Lejun <[email protected]>
:::::: CC: Lee Jones <[email protected]>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation