[PATCH 6/7] ARM: kirkwood: rtc-mv devicetree bindings

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Tue Mar 13 06:03:47 EDT 2012


On Tue, Mar 13, 2012 at 01:57:48AM +0000, Jason Cooper wrote:
> Signed-off-by: Jason Cooper <jason at lakedaemon.net>
> ---
>  drivers/rtc/rtc-mv.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/rtc/rtc-mv.c b/drivers/rtc/rtc-mv.c
> index 768e2ed..0dd8421 100644
> --- a/drivers/rtc/rtc-mv.c
> +++ b/drivers/rtc/rtc-mv.c
> @@ -12,6 +12,7 @@
>  #include <linux/bcd.h>
>  #include <linux/io.h>
>  #include <linux/platform_device.h>
> +#include <linux/of.h>
>  #include <linux/delay.h>
>  #include <linux/gfp.h>
>  #include <linux/module.h>
> @@ -294,11 +295,19 @@ static int __exit mv_rtc_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> +#ifdef CONFIG_OF
> +static struct of_device_id rtc_mv_of_match_table[] = {
> +	{ .compatible = "mrvl,orion-rtc", },
> +	{}
> +};
> +#endif
I guess it's a matter of taste, but you could use __maybe_unused instead
of #ifdef .. #endif.

Best regards
Uwe

> +
>  static struct platform_driver mv_rtc_driver = {
>  	.remove		= __exit_p(mv_rtc_remove),
>  	.driver		= {
>  		.name	= "rtc-mv",
>  		.owner	= THIS_MODULE,
> +		.of_match_table = of_match_ptr(rtc_mv_of_match_table),
>  	},
>  };
>  
> -- 
> 1.7.3.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |



More information about the linux-arm-kernel mailing list