diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-07-30 16:59:33 +0900 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2013-08-19 19:46:30 +0200 |
commit | 6d4028c644edc0a2e4a8c948ebf81e8f2f09726e (patch) | |
tree | 89368ad03dc603de4af756ba3e5260cee489f023 /drivers/i2c/busses/i2c-bfin-twi.c | |
parent | cda2109a26eb6fa58acfeae878eed87492480eae (diff) | |
download | kernel_goldelico_gta04-6d4028c644edc0a2e4a8c948ebf81e8f2f09726e.zip kernel_goldelico_gta04-6d4028c644edc0a2e4a8c948ebf81e8f2f09726e.tar.gz kernel_goldelico_gta04-6d4028c644edc0a2e4a8c948ebf81e8f2f09726e.tar.bz2 |
i2c: 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: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-bfin-twi.c')
-rw-r--r-- | drivers/i2c/busses/i2c-bfin-twi.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-bfin-twi.c b/drivers/i2c/busses/i2c-bfin-twi.c index 37d4239..35a473b 100644 --- a/drivers/i2c/busses/i2c-bfin-twi.c +++ b/drivers/i2c/busses/i2c-bfin-twi.c @@ -674,8 +674,9 @@ static int i2c_bfin_twi_probe(struct platform_device *pdev) p_adap->timeout = 5 * HZ; p_adap->retries = 3; - rc = peripheral_request_list((unsigned short *)pdev->dev.platform_data, - "i2c-bfin-twi"); + rc = peripheral_request_list( + (unsigned short *)dev_get_platdata(&pdev->dev), + "i2c-bfin-twi"); if (rc) { dev_err(&pdev->dev, "Can't setup pin mux!\n"); goto out_error_pin_mux; @@ -722,7 +723,7 @@ out_error_add_adapter: free_irq(iface->irq, iface); out_error_req_irq: out_error_no_irq: - peripheral_free_list((unsigned short *)pdev->dev.platform_data); + peripheral_free_list((unsigned short *)dev_get_platdata(&pdev->dev)); out_error_pin_mux: iounmap(iface->regs_base); out_error_ioremap: @@ -738,7 +739,7 @@ static int i2c_bfin_twi_remove(struct platform_device *pdev) i2c_del_adapter(&(iface->adap)); free_irq(iface->irq, iface); - peripheral_free_list((unsigned short *)pdev->dev.platform_data); + peripheral_free_list((unsigned short *)dev_get_platdata(&pdev->dev)); iounmap(iface->regs_base); kfree(iface); |