Re: [PATCH] rtc: add devm_rtc_device_{register,unregister}()

From: 'Tejun Heo'
Date: Mon Feb 25 2013 - 18:32:23 EST


On Mon, Feb 25, 2013 at 04:35:53PM +0900, Jingoo Han wrote:
> +static void devm_rtc_device_release(struct device *dev, void *res)
> +{
> + struct rtc_device *rtc = *(struct rtc_device **)res;
> +
> + rtc_device_unregister(rtc);
> +}
> +
> +static int devm_rtc_device_match(struct device *dev, void *res, void *data)
> +{
> + struct rtc **r = res;
> + if (!r || !*r) {
> + WARN_ON(!r || !*r);
> + return 0;
> + }

if (WARN_ON(!r || !*r))
return 0;

But why do we need this at all? Other match functions don't need it.
Is something different about devm_rtc?

Thanks.

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