Re: [PATCH 3/7] leds: pwm: add a new element 'name' to platform data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 28, 2010 at 3:40 PM, Arun Murthy <arun.murthy@xxxxxxxxxxxxxx> wrote:
> A new element 'name' is added to pwm led platform data structure.
> This is required to identify the pwm device.

I cannot see what this name is used for?

>
> Signed-off-by: Arun Murthy <arun.murthy@xxxxxxxxxxxxxx>
> Acked-by: Linus Walleij <linus.walleij@xxxxxxxxxxxxxx>
> ---
> Âdrivers/leds/leds-pwm.c Â| Â Â4 +++-
> Âinclude/linux/leds_pwm.h | Â Â1 +
> Â2 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/leds/leds-pwm.c b/drivers/leds/leds-pwm.c
> index da3fa8d..8da2be6 100644
> --- a/drivers/leds/leds-pwm.c
> +++ b/drivers/leds/leds-pwm.c
> @@ -66,8 +66,10 @@ static int led_pwm_probe(struct platform_device *pdev)
> Â Â Â Â Â Â Â Âcur_led = &pdata->leds[i];
> Â Â Â Â Â Â Â Âled_dat = &leds_data[i];
>
> + Â Â Â Â Â Â Â if (!pdata->name)
> + Â Â Â Â Â Â Â Â Â Â Â pdata->name = cur_led->name;
> Â Â Â Â Â Â Â Âled_dat->pwm = pwm_request(cur_led->pwm_id,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â cur_led->name);
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â pdata->name);
> Â Â Â Â Â Â Â Âif (IS_ERR(led_dat->pwm)) {
> Â Â Â Â Â Â Â Â Â Â Â Âdev_err(&pdev->dev, "unable to request PWM %d\n",
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âcur_led->pwm_id);
> diff --git a/include/linux/leds_pwm.h b/include/linux/leds_pwm.h
> index 33a0711..7a847a0 100644
> --- a/include/linux/leds_pwm.h
> +++ b/include/linux/leds_pwm.h
> @@ -16,6 +16,7 @@ struct led_pwm {
> Âstruct led_pwm_platform_data {
>    Âint           num_leds;
> Â Â Â Âstruct led_pwm Â*leds;
> + Â Â Â char *name;
> Â};
>
> Â#endif
> --
> 1.7.2.dirty
>
>



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux