[PATCH 1/3] OMAP2+: wd_timer: separate watchdog disable code from the rest of mach-omap2/devices.c

DebBarma, Tarun Kanti tarun.kanti at ti.com
Mon Nov 22 06:07:28 EST 2010


Hi Paul,

<<snip>>
...
> +
> +int omap2_wd_timer_disable(struct omap_hwmod *oh)
> +{
> +	void __iomem *base;
> +	int ret;
> +
> +	if (!oh) {
> +		pr_err("%s: Could not look up wdtimer_hwmod\n", __func__);
> +		return -EINVAL;
> +	}
> +
Just a minor observation. I was wondering if we need this check because
omap_hwmod_for_each_by_class(...) would call this only for valid oh.


        list_for_each_entry(temp_oh, &omap_hwmod_list, node) {
                if (!strcmp(temp_oh->class->name, classname)) {
                        pr_debug("omap_hwmod: %s: %s: calling callback fn\n",
                                 __func__, temp_oh->name);
                        ret = (*fn)(temp_oh, user);

--
Tarun



More information about the linux-arm-kernel mailing list