summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-sch311x.c
diff options
context:
space:
mode:
authorNizam Haider <nizamhaider786@gmail.com>2015-11-23 20:53:18 +0530
committerLinus Walleij <linus.walleij@linaro.org>2015-11-30 16:41:26 +0100
commitab128afce4ea8a496fc42553215f6635a14f05c3 (patch)
treee9711799a79e2dbb7dce914692326cdf639eed70 /drivers/gpio/gpio-sch311x.c
parentfb50cdfeeda868ae2bfe7ec2e0afebff53eca2d5 (diff)
downloadtalos-obmc-linux-ab128afce4ea8a496fc42553215f6635a14f05c3.tar.gz
talos-obmc-linux-ab128afce4ea8a496fc42553215f6635a14f05c3.zip
gpio: use dev_get_platdata()
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by: Nizam Haider <nijamh@cdac.in> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-sch311x.c')
-rw-r--r--drivers/gpio/gpio-sch311x.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-sch311x.c b/drivers/gpio/gpio-sch311x.c
index 3841398d1078..b454792de778 100644
--- a/drivers/gpio/gpio-sch311x.c
+++ b/drivers/gpio/gpio-sch311x.c
@@ -229,7 +229,7 @@ static int sch311x_gpio_direction_out(struct gpio_chip *chip, unsigned offset,
static int sch311x_gpio_probe(struct platform_device *pdev)
{
- struct sch311x_pdev_data *pdata = pdev->dev.platform_data;
+ struct sch311x_pdev_data *pdata = dev_get_platdata(&pdev->dev);
struct sch311x_gpio_priv *priv;
struct sch311x_gpio_block *block;
int err, i;
@@ -289,7 +289,7 @@ exit_err:
static int sch311x_gpio_remove(struct platform_device *pdev)
{
- struct sch311x_pdev_data *pdata = pdev->dev.platform_data;
+ struct sch311x_pdev_data *pdata = dev_get_platdata(&pdev->dev);
struct sch311x_gpio_priv *priv = platform_get_drvdata(pdev);
int i;
OpenPOWER on IntegriCloud