@@ -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);
}
@@ -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;
}
@@ -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];
@@ -300,8 +300,6 @@ static int __init egpio_probe(struct platform_device *pdev)
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),
@@ -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;
@@ -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;
remove redundant platform_set_drvdata(), Because there is no place to use the platform_get_drvdata 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-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-exar.c | 2 -- drivers/gpio/gpio-f7188x.c | 2 -- drivers/gpio/gpio-htc-egpio.c | 2 -- drivers/gpio/gpio-ixp4xx.c | 1 - drivers/gpio/gpio-janz-ttl.c | 1 - drivers/gpio/gpio-kempld.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 -- 17 files changed, 27 deletions(-)