Re: [PATCH 1/1] leds: tca6507: Use of_match_ptr() macro

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

 



On Thu, Mar 14, 2013 at 3:09 AM, Sachin Kamat <sachin.kamat@xxxxxxxxxx> wrote:
> This eliminates having an #ifdef returning NULL for the case
> when OF is disabled.
>

Thanks, merged.
-Bryan

> Signed-off-by: Sachin Kamat <sachin.kamat@xxxxxxxxxx>
> ---
>  drivers/leds/leds-tca6507.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/leds/leds-tca6507.c b/drivers/leds/leds-tca6507.c
> index 070ba07..98fe021 100644
> --- a/drivers/leds/leds-tca6507.c
> +++ b/drivers/leds/leds-tca6507.c
> @@ -85,6 +85,7 @@
>  #include <linux/gpio.h>
>  #include <linux/workqueue.h>
>  #include <linux/leds-tca6507.h>
> +#include <linux/of.h>
>
>  /* LED select registers determine the source that drives LED outputs */
>  #define TCA6507_LS_LED_OFF     0x0     /* Output HI-Z (off) */
> @@ -724,7 +725,6 @@ tca6507_led_dt_init(struct i2c_client *client)
>         return ERR_PTR(-ENODEV);
>  }
>
> -#define of_tca6507_leds_match NULL
>  #endif
>
>  static int tca6507_probe(struct i2c_client *client,
> @@ -813,7 +813,7 @@ static struct i2c_driver tca6507_driver = {
>         .driver   = {
>                 .name    = "leds-tca6507",
>                 .owner   = THIS_MODULE,
> -               .of_match_table = of_tca6507_leds_match,
> +               .of_match_table = of_match_ptr(of_tca6507_leds_match),
>         },
>         .probe    = tca6507_probe,
>         .remove   = tca6507_remove,
> --
> 1.7.4.1
>
--
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