Re: [PATCH v5 1/1] watchdog: Add tegra watchdog

2014-02-12 Thread Guenter Roeck
On Wed, Feb 12, 2014 at 01:43:37PM -0800, Andrew Chew wrote:
> > > +static void tegra_wdt_unref(struct watchdog_device *wdd) {
> > > + struct tegra_wdt *wdt = watchdog_get_drvdata(wdd);
> > > +
> > > + kref_put(&wdt->kref, tegra_wdt_release_resources); }
> > 
> > I forget why these were needed; they seem to do nothing.
> 
> The reason I did the whole kref thing was by following the guidance
> in Documentation/watchdog/watchdog-kernel-api.txt, which says
> that if the watchdog_device struct is dynamically allocated, then
> one needs this.
> 
I read that too, but I could not follow the logic behind it,
nor the explanation provided with the commit introducing it ;-)

Guenter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH v5 1/1] watchdog: Add tegra watchdog

2014-02-12 Thread Andrew Chew
> > +static void tegra_wdt_unref(struct watchdog_device *wdd) {
> > +   struct tegra_wdt *wdt = watchdog_get_drvdata(wdd);
> > +
> > +   kref_put(&wdt->kref, tegra_wdt_release_resources); }
> 
> I forget why these were needed; they seem to do nothing.

The reason I did the whole kref thing was by following the guidance
in Documentation/watchdog/watchdog-kernel-api.txt, which says
that if the watchdog_device struct is dynamically allocated, then
one needs this.

> > +MODULE_LICENSE("GPL");
> 
> That should be "GPL v2" according to the license header in the file.

Done.  Thanks!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v5 1/1] watchdog: Add tegra watchdog

2014-02-12 Thread Stephen Warren
On 02/06/2014 06:54 PM, Andrew Chew wrote:
> Add a driver for the hardware watchdogs in NVIDIA Tegra SoCs (Tegra30 and
> later).  This driver will configure one watchdog timer that will reset the
> system in the case of a watchdog timeout.
> 
> This driver binds to the nvidia,tegra30-timer device node and gets its
> register base from there.

Tested-by: Stephen Warren 

Briefly,
Reviewed-by: Stephen Warren 

Just a couple small comments though.

> diff --git a/drivers/watchdog/tegra_wdt.c b/drivers/watchdog/tegra_wdt.c

> +static void tegra_wdt_ref(struct watchdog_device *wdd)
> +{
> + struct tegra_wdt *wdt = watchdog_get_drvdata(wdd);
> +
> + kref_get(&wdt->kref);
> +}
> +
> +static void tegra_wdt_unref(struct watchdog_device *wdd)
> +{
> + struct tegra_wdt *wdt = watchdog_get_drvdata(wdd);
> +
> + kref_put(&wdt->kref, tegra_wdt_release_resources);
> +}

I forget why these were needed; they seem to do nothing.

> +MODULE_LICENSE("GPL");

That should be "GPL v2" according to the license header in the file.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH v5 1/1] watchdog: Add tegra watchdog

2014-02-11 Thread Andrew Chew
> On 02/06/2014 05:54 PM, Andrew Chew wrote:
> > Add a driver for the hardware watchdogs in NVIDIA Tegra SoCs (Tegra30
> > and later).  This driver will configure one watchdog timer that will
> > reset the system in the case of a watchdog timeout.
> >
> > This driver binds to the nvidia,tegra30-timer device node and gets its
> > register base from there.
> >
> > Signed-off-by: Andrew Chew 
> 
> Reviewed-by: Guenter Roeck 

Thanks, Guenter.

Pinging other potential reviewers.  Any other comments for me, guys?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v5 1/1] watchdog: Add tegra watchdog

2014-02-06 Thread Guenter Roeck

On 02/06/2014 05:54 PM, Andrew Chew wrote:

Add a driver for the hardware watchdogs in NVIDIA Tegra SoCs (Tegra30 and
later).  This driver will configure one watchdog timer that will reset the
system in the case of a watchdog timeout.

This driver binds to the nvidia,tegra30-timer device node and gets its
register base from there.

Signed-off-by: Andrew Chew 


Reviewed-by: Guenter Roeck 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/