Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 87aae1ea authored by Jingoo Han's avatar Jingoo Han Committed by Bryan Wu
Browse files

leds: use dev_get_platdata()



Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.

Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarBryan Wu <cooloney@gmail.com>
parent 8465b018
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -157,7 +157,7 @@ static int pm860x_led_dt_init(struct platform_device *pdev,
static int pm860x_led_probe(struct platform_device *pdev)
{
	struct pm860x_chip *chip = dev_get_drvdata(pdev->dev.parent);
	struct pm860x_led_pdata *pdata = pdev->dev.platform_data;
	struct pm860x_led_pdata *pdata = dev_get_platdata(&pdev->dev);
	struct pm860x_led *data;
	struct resource *res;
	int ret = 0;
+3 −3
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@ static int adp5520_led_setup(struct adp5520_led *led)

static int adp5520_led_prepare(struct platform_device *pdev)
{
	struct adp5520_leds_platform_data *pdata = pdev->dev.platform_data;
	struct adp5520_leds_platform_data *pdata = dev_get_platdata(&pdev->dev);
	struct device *dev = pdev->dev.parent;
	int ret = 0;

@@ -103,7 +103,7 @@ static int adp5520_led_prepare(struct platform_device *pdev)

static int adp5520_led_probe(struct platform_device *pdev)
{
	struct adp5520_leds_platform_data *pdata = pdev->dev.platform_data;
	struct adp5520_leds_platform_data *pdata = dev_get_platdata(&pdev->dev);
	struct adp5520_led *led, *led_dat;
	struct led_info *cur_led;
	int ret, i;
@@ -185,7 +185,7 @@ static int adp5520_led_probe(struct platform_device *pdev)

static int adp5520_led_remove(struct platform_device *pdev)
{
	struct adp5520_leds_platform_data *pdata = pdev->dev.platform_data;
	struct adp5520_leds_platform_data *pdata = dev_get_platdata(&pdev->dev);
	struct adp5520_led *led;
	int i;

+2 −2
Original line number Diff line number Diff line
@@ -94,7 +94,7 @@ static int blink_set(struct led_classdev *cdev,

static int asic3_led_probe(struct platform_device *pdev)
{
	struct asic3_led *led = pdev->dev.platform_data;
	struct asic3_led *led = dev_get_platdata(&pdev->dev);
	int ret;

	ret = mfd_cell_enable(pdev);
@@ -127,7 +127,7 @@ static int asic3_led_probe(struct platform_device *pdev)

static int asic3_led_remove(struct platform_device *pdev)
{
	struct asic3_led *led = pdev->dev.platform_data;
	struct asic3_led *led = dev_get_platdata(&pdev->dev);

	led_classdev_unregister(led->cdev);

+2 −2
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ static int pwmled_probe(struct platform_device *pdev)
	int					i;
	int					status;

	pdata = pdev->dev.platform_data;
	pdata = dev_get_platdata(&pdev->dev);
	if (!pdata || pdata->num_leds < 1)
		return -ENODEV;

@@ -119,7 +119,7 @@ static int pwmled_remove(struct platform_device *pdev)
	struct pwmled				*leds;
	unsigned				i;

	pdata = pdev->dev.platform_data;
	pdata = dev_get_platdata(&pdev->dev);
	leds = platform_get_drvdata(pdev);

	for (i = 0; i < pdata->num_leds; i++) {
+1 −1
Original line number Diff line number Diff line
@@ -684,7 +684,7 @@ static int bd2802_probe(struct i2c_client *client,
	}

	led->client = client;
	pdata = led->pdata = client->dev.platform_data;
	pdata = led->pdata = dev_get_platdata(&client->dev);
	i2c_set_clientdata(client, led);

	/* Configure RESET GPIO (L: RESET, H: RESET cancel) */
Loading