Re: [PATCH 1/2] leds: leds-gpio: use of_match_ptr()

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

 



On Thu, Aug 16, 2012 at 6:35 PM, Tobias Klauser <tklauser@xxxxxxxxxx> wrote:
> Instead of having to define the match table to NULL if CONFIG_OF isn't
> set, use the of_match_ptr() macro which will do this for us.
>

Thanks, applied to my for-next branch.

-Bryan

> Signed-off-by: Tobias Klauser <tklauser@xxxxxxxxxx>
> ---
>  drivers/leds/leds-gpio.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
> index c032b21..4043f77 100644
> --- a/drivers/leds/leds-gpio.c
> +++ b/drivers/leds/leds-gpio.c
> @@ -228,7 +228,6 @@ static struct gpio_leds_priv * __devinit gpio_leds_create_of(struct platform_dev
>  {
>         return NULL;
>  }
> -#define of_gpio_leds_match NULL
>  #endif /* CONFIG_OF_GPIO */
>
>
> @@ -287,7 +286,7 @@ static struct platform_driver gpio_led_driver = {
>         .driver         = {
>                 .name   = "leds-gpio",
>                 .owner  = THIS_MODULE,
> -               .of_match_table = of_gpio_leds_match,
> +               .of_match_table = of_match_ptr(of_gpio_leds_match),
>         },
>  };
>
> --
> 1.7.5.4
>



-- 
Bryan Wu <bryan.wu@xxxxxxxxxxxxx>
Kernel Developer    +86.186-168-78255 Mobile
Canonical Ltd.      www.canonical.com
Ubuntu - Linux for human beings | www.ubuntu.com
--
To unsubscribe from this list: send the line "unsubscribe linux-leds" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux