leds: 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: Bryan Wu <cooloney@gmail.com>
This commit is contained in:
@@ -306,7 +306,7 @@ create_netxbig_led(struct platform_device *pdev,
|
||||
struct netxbig_led_data *led_dat,
|
||||
const struct netxbig_led *template)
|
||||
{
|
||||
struct netxbig_led_platform_data *pdata = pdev->dev.platform_data;
|
||||
struct netxbig_led_platform_data *pdata = dev_get_platdata(&pdev->dev);
|
||||
int ret;
|
||||
|
||||
spin_lock_init(&led_dat->lock);
|
||||
@@ -354,7 +354,7 @@ create_netxbig_led(struct platform_device *pdev,
|
||||
|
||||
static int netxbig_led_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct netxbig_led_platform_data *pdata = pdev->dev.platform_data;
|
||||
struct netxbig_led_platform_data *pdata = dev_get_platdata(&pdev->dev);
|
||||
struct netxbig_led_data *leds_data;
|
||||
int i;
|
||||
int ret;
|
||||
@@ -391,7 +391,7 @@ err_free_leds:
|
||||
|
||||
static int netxbig_led_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct netxbig_led_platform_data *pdata = pdev->dev.platform_data;
|
||||
struct netxbig_led_platform_data *pdata = dev_get_platdata(&pdev->dev);
|
||||
struct netxbig_led_data *leds_data;
|
||||
int i;
|
||||
|
||||
|
Reference in New Issue
Block a user