Re: [PATCH 1/4] watchdog: Add multiple device support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

<snip>

@@ -102,6 +122,7 @@ void watchdog_unregister_device(struct watchdog_device *wdd)
ret = watchdog_dev_unregister(wdd);
if (ret)
pr_err("error unregistering /dev/watchdog (err=%d)\n", ret);
+ ida_simple_remove(&watchdog_ida, wdd->id);
}
EXPORT_SYMBOL_GPL(watchdog_unregister_device);


A note to myself :) : This is going to become a problem once we support
dynamic allocated watchdog structs, as the unregister will unref the struct,
so it may be gone after the unregister, solution: store id in a local var
before calling unregister.

Scrap that my support for dynamically allocated watchdog_dev structs patch does
not do an automatic unref on unregister, instead it expects the caller of
unregister to manually do the unref itself (for drivers which use the ref
counting), which actually is better, as it does not cause problems like the
above.

Regards,

Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux