@@ -135,8 +135,6 @@ static int mmio_74xx_gpio_probe(struct platform_device *pdev)
priv->gc.ngpio = MMIO_74XX_BIT_CNT(priv->flags);
priv->gc.owner = THIS_MODULE;
- platform_set_drvdata(pdev, priv);
-
return devm_gpiochip_add_data(&pdev->dev, &priv->gc, priv);
}
@@ -495,7 +495,6 @@ static int gpio_aggregator_probe(struct platform_device *pdev)
if (IS_ERR(fwd))
return PTR_ERR(fwd);
- platform_set_drvdata(pdev, fwd);
return 0;
}
@@ -172,8 +172,6 @@ static int amd_fch_gpio_probe(struct platform_device *pdev)
if (IS_ERR(priv->base))
return PTR_ERR(priv->base);
- platform_set_drvdata(pdev, priv);
-
return devm_gpiochip_add_data(&pdev->dev, &priv->gc, priv);
}
@@ -597,7 +597,6 @@ static int bcm_kona_gpio_probe(struct platform_device *pdev)
return -ENOMEM;
kona_gpio->pdev = pdev;
- platform_set_drvdata(pdev, kona_gpio);
chip->parent = dev;
chip->ngpio = kona_gpio->num_bank * GPIO_PER_BANK;
@@ -62,7 +62,6 @@ static int clps711x_gpio_probe(struct platform_device *pdev)
gc->base = -1;
gc->owner = THIS_MODULE;
- platform_set_drvdata(pdev, gc);
return devm_gpiochip_add_data(&pdev->dev, gc, NULL);
}
@@ -266,7 +266,6 @@ static int davinci_gpio_probe(struct platform_device *pdev)
if (ret)
return ret;
- platform_set_drvdata(pdev, chips);
ret = davinci_gpio_irq_setup(pdev);
if (ret)
return ret;
@@ -734,8 +734,6 @@ static int dwapb_gpio_probe(struct platform_device *pdev)
return err;
}
- platform_set_drvdata(pdev, gpio);
-
return 0;
}
@@ -653,7 +653,6 @@ static int sprd_eic_probe(struct platform_device *pdev)
return ret;
}
- platform_set_drvdata(pdev, sprd_eic);
return 0;
}
@@ -281,7 +281,6 @@ static int em_gio_probe(struct platform_device *pdev)
return -ENOMEM;
p->pdev = pdev;
- platform_set_drvdata(pdev, p);
spin_lock_init(&p->sense_lock);
irq[0] = platform_get_irq(pdev, 0);
@@ -217,8 +217,6 @@ static int gpio_exar_probe(struct platform_device *pdev)
if (ret)
return ret;
- platform_set_drvdata(pdev, exar_gpio);
-
return 0;
}
@@ -499,8 +499,6 @@ static int f7188x_gpio_probe(struct platform_device *pdev)
}
data->sio = sio;
- platform_set_drvdata(pdev, data);
-
/* For each GPIO bank, register a GPIO chip. */
for (i = 0; i < data->nr_bank; i++) {
struct f7188x_gpio_bank *bank = &data->bank[i];
@@ -299,9 +299,6 @@ static int __init egpio_probe(struct platform_device *pdev)
pr_debug("reg_shift = %d\n", ei->reg_shift);
ei->reg_mask = (1 << pdata->reg_width) - 1;
-
- platform_set_drvdata(pdev, ei);
-
ei->nchips = pdata->num_chips;
ei->chip = devm_kcalloc(&pdev->dev,
ei->nchips, sizeof(struct egpio_chip),
@@ -109,8 +109,6 @@ static int imx_scu_gpio_probe(struct platform_device *pdev)
gc->set = imx_scu_gpio_set;
gc->get_direction = imx_scu_gpio_get_direction;
- platform_set_drvdata(pdev, priv);
-
return devm_gpiochip_add_data(dev, gc, priv);
}
@@ -287,7 +287,6 @@ static int ixp4xx_gpio_probe(struct platform_device *pdev)
return ret;
}
- platform_set_drvdata(pdev, g);
dev_info(dev, "IXP4 GPIO registered\n");
return 0;
@@ -154,7 +154,6 @@ static int ttl_probe(struct platform_device *pdev)
if (!mod)
return -ENOMEM;
- platform_set_drvdata(pdev, mod);
spin_lock_init(&mod->lock);
/* get access to the MODULbus registers for this module */
@@ -151,8 +151,6 @@ static int kempld_gpio_probe(struct platform_device *pdev)
gpio->pld = pld;
- platform_set_drvdata(pdev, gpio);
-
chip = &gpio->chip;
chip->label = "gpio-kempld";
chip->owner = THIS_MODULE;
@@ -192,8 +192,6 @@ static int gpio_latch_probe(struct platform_device *pdev)
priv->gc.base = -1;
priv->gc.parent = &pdev->dev;
- platform_set_drvdata(pdev, priv);
-
return devm_gpiochip_add_data(&pdev->dev, &priv->gc, priv);
}
@@ -139,8 +139,6 @@ static int logicvc_gpio_probe(struct platform_device *pdev)
logicvc->chip.set = logicvc_gpio_set;
logicvc->chip.direction_output = logicvc_gpio_direction_output;
- platform_set_drvdata(pdev, logicvc);
-
return devm_gpiochip_add_data(dev, &logicvc->chip, logicvc);
}
@@ -72,7 +72,6 @@ static int ls1x_gpio_probe(struct platform_device *pdev)
if (ret)
goto err;
- platform_set_drvdata(pdev, gc);
dev_info(dev, "Loongson1 GPIO driver registered\n");
return 0;
@@ -199,8 +199,6 @@ static int lp3943_gpio_probe(struct platform_device *pdev)
lp3943_gpio->chip = lp3943_gpio_chip;
lp3943_gpio->chip.parent = &pdev->dev;
- platform_set_drvdata(pdev, lp3943_gpio);
-
return devm_gpiochip_add_data(&pdev->dev, &lp3943_gpio->chip,
lp3943_gpio);
}
@@ -140,8 +140,6 @@ static int lp873x_gpio_probe(struct platform_device *pdev)
if (!gpio)
return -ENOMEM;
- platform_set_drvdata(pdev, gpio);
-
gpio->lp873 = dev_get_drvdata(pdev->dev.parent);
gpio->chip = template_chip;
gpio->chip.parent = gpio->lp873->dev;
@@ -331,8 +331,6 @@ static int max77620_gpio_probe(struct platform_device *pdev)
girq->init_hw = max77620_gpio_irq_init_hw;
girq->threaded = true;
- platform_set_drvdata(pdev, mgpio);
-
ret = devm_gpiochip_add_data(&pdev->dev, &mgpio->gpio_chip, mgpio);
if (ret < 0) {
dev_err(&pdev->dev, "gpio_init: Failed to add max77620_gpio\n");
@@ -82,7 +82,6 @@ static int mlxbf_gpio_probe(struct platform_device *pdev)
return ret;
}
- platform_set_drvdata(pdev, gs);
dev_info(&pdev->dev, "registered Mellanox BlueField GPIO");
return 0;
}
@@ -402,8 +402,6 @@ mlxbf2_gpio_probe(struct platform_device *pdev)
}
}
- platform_set_drvdata(pdev, gs);
-
ret = devm_gpiochip_add_data(dev, &gs->gc, gs);
if (ret) {
dev_err(dev, "Failed adding memory mapped gpiochip\n");
@@ -787,8 +787,6 @@ static int bgpio_pdev_probe(struct platform_device *pdev)
gc->ngpio = pdata->ngpio;
}
- platform_set_drvdata(pdev, gc);
-
return devm_gpiochip_add_data(&pdev->dev, gc, NULL);
}
@@ -625,8 +625,6 @@ static int msc313_gpio_probe(struct platform_device *pdev)
if (IS_ERR(gpio->base))
return PTR_ERR(gpio->base);
- platform_set_drvdata(pdev, gpio);
-
gpiochip = devm_kzalloc(dev, sizeof(*gpiochip), GFP_KERNEL);
if (!gpiochip)
return -ENOMEM;
@@ -315,7 +315,6 @@ mediatek_gpio_probe(struct platform_device *pdev)
return mtk->gpio_irq;
mtk->dev = dev;
- platform_set_drvdata(pdev, mtk);
for (i = 0; i < MTK_BANK_CNT; i++) {
ret = mediatek_gpio_bank_probe(dev, i);
@@ -1143,8 +1143,6 @@ static int mvebu_gpio_probe(struct platform_device *pdev)
if (!mvchip)
return -ENOMEM;
- platform_set_drvdata(pdev, mvchip);
-
if (of_property_read_u32(pdev->dev.of_node, "ngpios", &ngpios)) {
dev_err(&pdev->dev, "Missing ngpios OF property\n");
return -ENODEV;
@@ -489,8 +489,6 @@ static int mxc_gpio_probe(struct platform_device *pdev)
list_add_tail(&port->node, &mxc_gpio_ports);
- platform_set_drvdata(pdev, port);
-
return 0;
out_irqdomain_remove:
@@ -762,8 +762,6 @@ static struct platform_device omap_mpuio_device = {
static inline void omap_mpuio_init(struct gpio_bank *bank)
{
- platform_set_drvdata(&omap_mpuio_device, bank);
-
if (platform_driver_register(&omap_mpuio_driver) == 0)
(void) platform_device_register(&omap_mpuio_device);
}
@@ -1457,8 +1455,6 @@ static int omap_gpio_probe(struct platform_device *pdev)
}
}
- platform_set_drvdata(pdev, bank);
-
pm_runtime_enable(dev);
pm_runtime_get_sync(dev);
@@ -184,7 +184,6 @@ static int palmas_gpio_probe(struct platform_device *pdev)
return ret;
}
- platform_set_drvdata(pdev, palmas_gpio);
return ret;
}
@@ -363,7 +363,6 @@ static int sprd_pmic_eic_probe(struct platform_device *pdev)
return ret;
}
- platform_set_drvdata(pdev, pmic_eic);
return 0;
}
@@ -121,8 +121,6 @@ static int rc5t583_gpio_probe(struct platform_device *pdev)
if (pdata && pdata->gpio_base)
rc5t583_gpio->gpio_chip.base = pdata->gpio_base;
- platform_set_drvdata(pdev, rc5t583_gpio);
-
return devm_gpiochip_add_data(&pdev->dev, &rc5t583_gpio->gpio_chip,
rc5t583_gpio);
}
@@ -513,8 +513,6 @@ static int gpio_rcar_probe(struct platform_device *pdev)
if (ret < 0)
return ret;
- platform_set_drvdata(pdev, p);
-
pm_runtime_enable(dev);
ret = platform_get_irq(pdev, 0);
@@ -263,8 +263,6 @@ static int rda_gpio_probe(struct platform_device *pdev)
girq->parents[0] = rda_gpio->irq;
}
- platform_set_drvdata(pdev, rda_gpio);
-
return devm_gpiochip_add_data(dev, &rda_gpio->chip, rda_gpio);
}
@@ -161,8 +161,6 @@ static int rdc321x_gpio_probe(struct platform_device *pdev)
rdc321x_gpio_dev->chip.base = 0;
rdc321x_gpio_dev->chip.ngpio = pdata->max_gpios;
- platform_set_drvdata(pdev, rdc321x_gpio_dev);
-
/* This might not be, what others (BIOS, bootloader, etc.)
wrote to these registers before, but it's a good guess. Still
better than just using 0xffffffff. */
@@ -189,7 +189,6 @@ static int sama5d2_piobu_probe(struct platform_device *pdev)
if (!piobu)
return -ENOMEM;
- platform_set_drvdata(pdev, piobu);
piobu->chip.label = pdev->name;
piobu->chip.parent = &pdev->dev;
piobu->chip.owner = THIS_MODULE,
@@ -380,8 +380,6 @@ static int sch_gpio_probe(struct platform_device *pdev)
return -ENODEV;
}
- platform_set_drvdata(pdev, sch);
-
girq = &sch->chip.irq;
gpio_irq_chip_set_chip(girq, &sch_irqchip);
girq->num_parents = 0;
@@ -281,8 +281,6 @@ static int sch311x_gpio_probe(struct platform_device *pdev)
if (!priv)
return -ENOMEM;
- platform_set_drvdata(pdev, priv);
-
for (i = 0; i < ARRAY_SIZE(priv->blocks); i++) {
block = &priv->blocks[i];
@@ -256,7 +256,6 @@ static int sifive_gpio_probe(struct platform_device *pdev)
girq->handler = handle_bad_irq;
girq->default_type = IRQ_TYPE_NONE;
- platform_set_drvdata(pdev, chip);
return gpiochip_add_data(&chip->gc, chip);
}
@@ -249,8 +249,6 @@ static int syscon_gpio_probe(struct platform_device *pdev)
priv->chip.direction_output = syscon_gpio_dir_out;
}
- platform_set_drvdata(pdev, priv);
-
return devm_gpiochip_add_data(&pdev->dev, &priv->chip, priv);
}
@@ -728,8 +728,6 @@ static int tegra_gpio_probe(struct platform_device *pdev)
tgi->gc.ngpio = tgi->bank_count * 32;
tgi->gc.parent = &pdev->dev;
- platform_set_drvdata(pdev, tgi);
-
if (tgi->soc->debounce_supported)
tgi->gc.set_config = tegra_gpio_set_config;
@@ -256,8 +256,6 @@ static int timbgpio_probe(struct platform_device *pdev)
if (err)
return err;
- platform_set_drvdata(pdev, tgpio);
-
/* make sure to disable interrupts */
iowrite32(0x0, tgpio->membase + TGPIO_IER);
@@ -259,8 +259,6 @@ static int tqmx86_gpio_probe(struct platform_device *pdev)
tqmx86_gpio_write(gpio, (u8)~TQMX86_DIR_INPUT_MASK, TQMX86_GPIODD);
- platform_set_drvdata(pdev, gpio);
-
chip = &gpio->chip;
chip->label = "gpio-tqmx86";
chip->owner = THIS_MODULE;
@@ -52,8 +52,6 @@ static int ts4800_gpio_probe(struct platform_device *pdev)
chip->ngpio = ngpios;
- platform_set_drvdata(pdev, chip);
-
return devm_gpiochip_add_data(&pdev->dev, chip, NULL);
}
@@ -240,8 +240,6 @@ static int vx855gpio_probe(struct platform_device *pdev)
if (!vg)
return -ENOMEM;
- platform_set_drvdata(pdev, vg);
-
dev_info(&pdev->dev, "found VX855 GPIO controller\n");
vg->io_gpi = res_gpi->start;
vg->io_gpo = res_gpo->start;
@@ -433,8 +433,6 @@ static int wcove_gpio_probe(struct platform_device *pdev)
wg->regmap_irq_chip = pmic->irq_chip_data;
- platform_set_drvdata(pdev, wg);
-
mutex_init(&wg->buslock);
wg->chip.label = KBUILD_MODNAME;
wg->chip.direction_input = wcove_gpio_dir_in;
@@ -180,8 +180,6 @@ static int xgene_gpio_probe(struct platform_device *pdev)
gpio->chip.label = dev_name(&pdev->dev);
gpio->chip.base = -1;
- platform_set_drvdata(pdev, gpio);
-
return devm_gpiochip_add_data(&pdev->dev, &gpio->chip, gpio);
}
@@ -176,8 +176,6 @@ static int zevio_gpio_probe(struct platform_device *pdev)
if (!controller)
return -ENOMEM;
- platform_set_drvdata(pdev, controller);
-
/* Copy our reference */
controller->chip = zevio_gpio_chip;
controller->chip.parent = &pdev->dev;
@@ -120,8 +120,6 @@ static int modepin_gpio_probe(struct platform_device *pdev)
if (!chip)
return -ENOMEM;
- platform_set_drvdata(pdev, chip);
-
/* configure the gpio chip */
chip->base = -1;
chip->ngpio = MODE_PINS;
platform_set_drvdata() is redundant in these functions. the purpose of calling this function is to place data in *driver_data. but the data is not retrieved in these functions Signed-off-by: Lizhe <sensor1010@163.com> --- drivers/gpio/gpio-74xx-mmio.c | 2 -- drivers/gpio/gpio-aggregator.c | 1 - drivers/gpio/gpio-amd-fch.c | 2 -- drivers/gpio/gpio-bcm-kona.c | 1 - drivers/gpio/gpio-clps711x.c | 1 - drivers/gpio/gpio-davinci.c | 1 - drivers/gpio/gpio-dwapb.c | 2 -- drivers/gpio/gpio-eic-sprd.c | 1 - drivers/gpio/gpio-em.c | 1 - drivers/gpio/gpio-exar.c | 2 -- drivers/gpio/gpio-f7188x.c | 2 -- drivers/gpio/gpio-htc-egpio.c | 3 --- drivers/gpio/gpio-imx-scu.c | 2 -- drivers/gpio/gpio-ixp4xx.c | 1 - drivers/gpio/gpio-janz-ttl.c | 1 - drivers/gpio/gpio-kempld.c | 2 -- drivers/gpio/gpio-latch.c | 2 -- drivers/gpio/gpio-logicvc.c | 2 -- drivers/gpio/gpio-loongson1.c | 1 - drivers/gpio/gpio-lp3943.c | 2 -- drivers/gpio/gpio-lp873x.c | 2 -- drivers/gpio/gpio-max77620.c | 2 -- drivers/gpio/gpio-mlxbf.c | 1 - drivers/gpio/gpio-mlxbf2.c | 2 -- drivers/gpio/gpio-mmio.c | 2 -- drivers/gpio/gpio-msc313.c | 2 -- drivers/gpio/gpio-mt7621.c | 1 - drivers/gpio/gpio-mvebu.c | 2 -- drivers/gpio/gpio-mxc.c | 2 -- drivers/gpio/gpio-omap.c | 4 ---- drivers/gpio/gpio-palmas.c | 1 - drivers/gpio/gpio-pmic-eic-sprd.c | 1 - drivers/gpio/gpio-rc5t583.c | 2 -- drivers/gpio/gpio-rcar.c | 2 -- drivers/gpio/gpio-rda.c | 2 -- drivers/gpio/gpio-rdc321x.c | 2 -- drivers/gpio/gpio-sama5d2-piobu.c | 1 - drivers/gpio/gpio-sch.c | 2 -- drivers/gpio/gpio-sch311x.c | 2 -- drivers/gpio/gpio-sifive.c | 1 - drivers/gpio/gpio-syscon.c | 2 -- drivers/gpio/gpio-tegra.c | 2 -- drivers/gpio/gpio-timberdale.c | 2 -- drivers/gpio/gpio-tqmx86.c | 2 -- drivers/gpio/gpio-ts4800.c | 2 -- drivers/gpio/gpio-vx855.c | 2 -- drivers/gpio/gpio-wcove.c | 2 -- drivers/gpio/gpio-xgene.c | 2 -- drivers/gpio/gpio-zevio.c | 2 -- drivers/gpio/gpio-zynqmp-modepin.c | 2 -- 50 files changed, 88 deletions(-)