diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-07-30 04:10:05 -0400 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2013-07-31 08:01:29 -0400 |
commit | 334a41ce9b753ec615e8c6c50ee07d6197190610 (patch) | |
tree | a56c8e04be30b8839ba11179ceffaad0b0bb8bc2 /drivers/mfd/htc-i2cpld.c | |
parent | 3e4f8789946de61c61ce6a373d069d55725d956c (diff) |
mfd: Use dev_get_platdata()
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/htc-i2cpld.c')
-rw-r--r-- | drivers/mfd/htc-i2cpld.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mfd/htc-i2cpld.c b/drivers/mfd/htc-i2cpld.c index c9dfce6ae0c2..d7b2a75aca3e 100644 --- a/drivers/mfd/htc-i2cpld.c +++ b/drivers/mfd/htc-i2cpld.c | |||
@@ -340,7 +340,7 @@ static int htcpld_setup_chip_irq( | |||
340 | int ret = 0; | 340 | int ret = 0; |
341 | 341 | ||
342 | /* Get the platform and driver data */ | 342 | /* Get the platform and driver data */ |
343 | pdata = dev->platform_data; | 343 | pdata = dev_get_platdata(dev); |
344 | htcpld = platform_get_drvdata(pdev); | 344 | htcpld = platform_get_drvdata(pdev); |
345 | chip = &htcpld->chip[chip_index]; | 345 | chip = &htcpld->chip[chip_index]; |
346 | plat_chip_data = &pdata->chip[chip_index]; | 346 | plat_chip_data = &pdata->chip[chip_index]; |
@@ -375,7 +375,7 @@ static int htcpld_register_chip_i2c( | |||
375 | struct i2c_board_info info; | 375 | struct i2c_board_info info; |
376 | 376 | ||
377 | /* Get the platform and driver data */ | 377 | /* Get the platform and driver data */ |
378 | pdata = dev->platform_data; | 378 | pdata = dev_get_platdata(dev); |
379 | htcpld = platform_get_drvdata(pdev); | 379 | htcpld = platform_get_drvdata(pdev); |
380 | chip = &htcpld->chip[chip_index]; | 380 | chip = &htcpld->chip[chip_index]; |
381 | plat_chip_data = &pdata->chip[chip_index]; | 381 | plat_chip_data = &pdata->chip[chip_index]; |
@@ -447,7 +447,7 @@ static int htcpld_register_chip_gpio( | |||
447 | int ret = 0; | 447 | int ret = 0; |
448 | 448 | ||
449 | /* Get the platform and driver data */ | 449 | /* Get the platform and driver data */ |
450 | pdata = dev->platform_data; | 450 | pdata = dev_get_platdata(dev); |
451 | htcpld = platform_get_drvdata(pdev); | 451 | htcpld = platform_get_drvdata(pdev); |
452 | chip = &htcpld->chip[chip_index]; | 452 | chip = &htcpld->chip[chip_index]; |
453 | plat_chip_data = &pdata->chip[chip_index]; | 453 | plat_chip_data = &pdata->chip[chip_index]; |
@@ -509,7 +509,7 @@ static int htcpld_setup_chips(struct platform_device *pdev) | |||
509 | int i; | 509 | int i; |
510 | 510 | ||
511 | /* Get the platform and driver data */ | 511 | /* Get the platform and driver data */ |
512 | pdata = dev->platform_data; | 512 | pdata = dev_get_platdata(dev); |
513 | htcpld = platform_get_drvdata(pdev); | 513 | htcpld = platform_get_drvdata(pdev); |
514 | 514 | ||
515 | /* Setup each chip's output GPIOs */ | 515 | /* Setup each chip's output GPIOs */ |
@@ -574,7 +574,7 @@ static int htcpld_core_probe(struct platform_device *pdev) | |||
574 | if (!dev) | 574 | if (!dev) |
575 | return -ENODEV; | 575 | return -ENODEV; |
576 | 576 | ||
577 | pdata = dev->platform_data; | 577 | pdata = dev_get_platdata(dev); |
578 | if (!pdata) { | 578 | if (!pdata) { |
579 | dev_warn(dev, "Platform data not found for htcpld core!\n"); | 579 | dev_warn(dev, "Platform data not found for htcpld core!\n"); |
580 | return -ENXIO; | 580 | return -ENXIO; |