From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dinh Nguyen Subject: Re: [PATCH] watchdog: dw: Enable OF support for DW watchdog timer. Date: Wed, 10 Jul 2013 09:55:48 -0500 Message-ID: <1373468148.8797.0.camel@linux-builds1> References: <1373411377-5170-1-git-send-email-dinguyen@altera.com> <20130710104101.GA3552@page> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130710104101.GA3552@page> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: "devicetree-discuss" To: Jamie Iles Cc: Viresh Kumar , dinh.linux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Pavel Machek , devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, Rob Herring , Wim Van Sebroeck , Grant Likely List-Id: devicetree@vger.kernel.org On Wed, 2013-07-10 at 11:41 +0100, Jamie Iles wrote: > Hi Dinh, > > On Tue, Jul 09, 2013 at 06:09:37PM -0500, dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org wrote: > > From: Dinh Nguyen > > > > Add device tree support to the DW watchdog timer. > > > > Signed-off-by: Dinh Nguyen > > Cc: Jamie Iles > > Cc: Viresh Kumar > > Cc: Grant Likely > > Cc: Rob Herring > > Cc: Wim Van Sebroeck > > Cc: Pavel Machek > > --- > > .../devicetree/bindings/watchdog/dw_wdt.txt | 16 ++++++++++++++++ > > drivers/watchdog/dw_wdt.c | 7 +++++++ > > 2 files changed, 23 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/watchdog/dw_wdt.txt > > > > diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c > > index 2037669..f7eec38 100644 > > --- a/drivers/watchdog/dw_wdt.c > > +++ b/drivers/watchdog/dw_wdt.c > > @@ -343,12 +343,19 @@ static int dw_wdt_drv_remove(struct platform_device *pdev) > > return 0; > > } > > > > +static const struct of_device_id dw_wdt_of_match[] = { > > + { .compatible = "snps,dw-wdt", }, > > + { /* sentinel */ } > > +}; > > +MODULE_DEVICE_TABLE(of, dw_wdt_of_match); > > + > > static struct platform_driver dw_wdt_driver = { > > .probe = dw_wdt_drv_probe, > > .remove = dw_wdt_drv_remove, > > .driver = { > > .name = "dw_wdt", > > .owner = THIS_MODULE, > > + .of_match_table = dw_wdt_of_match, > > I think we want: > > .of_match_table = of_match_ptr(dw_wdt_of_match), > > as the module doesn't have an OF dependency. Thanks Jamie, I'll send a v2 with your Ack and comment. Dinh > > Otherwise looks good to me. > > Acked-by: Jamie Iles > > Thanks, > > Jamie >