From: Joseph Lo Date: Fri, 4 Jan 2013 23:34:45 +0000 (-0800) Subject: drivers/rtc/rtc-tegra.c: convert to DT driver X-Git-Tag: upstream/snapshot3+hdmi~5919^2~34 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2d79cf8a9dfbaef1e57c88a709689577c8482a17;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git drivers/rtc/rtc-tegra.c: convert to DT driver After Kernel 3.7, the Tegra device will only support booting with DT. The legacy Tegra RTC platform driver will not work anymore. This patch converts the driver to support DT. Signed-off-by: Joseph Lo Cc: Stephen Warren Cc: Joseph Lo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/rtc/rtc-tegra.c b/drivers/rtc/rtc-tegra.c index 5ba2f75..c84ea66 100644 --- a/drivers/rtc/rtc-tegra.c +++ b/drivers/rtc/rtc-tegra.c @@ -303,6 +303,12 @@ static struct rtc_class_ops tegra_rtc_ops = { .alarm_irq_enable = tegra_rtc_alarm_irq_enable, }; +static const struct of_device_id tegra_rtc_dt_match[] = { + { .compatible = "nvidia,tegra20-rtc", }, + {} +}; +MODULE_DEVICE_TABLE(of, tegra_rtc_dt_match); + static int tegra_rtc_probe(struct platform_device *pdev) { struct tegra_rtc_info *info; @@ -440,6 +446,7 @@ static struct platform_driver tegra_rtc_driver = { .driver = { .name = "tegra_rtc", .owner = THIS_MODULE, + .of_match_table = tegra_rtc_dt_match, }, #ifdef CONFIG_PM .suspend = tegra_rtc_suspend,