Message ID | 20121219143725.3f49598c.akpm@linux-foundation.org |
---|---|
State | Accepted |
Headers | show |
Am 19.12.2012 23:37, schrieb Andrew Morton: > I think I'll do this: > > > From: Andrew Morton <akpm@linux-foundation.org> > Subject: revert "rtc: recycle id when unloading a rtc driver" Thanks a lot, I just haven't seen the stuff got broken with 3.7 as I haven't played much with RTCs before (just used them). So I didn't looked at the git history and fixed it myself just to find out Lothar already had send a patch. ;) And for the symmetrie between register/unregister (moving ida_simple_remove() from release() to unregister()) I'm not exactly sure if that wouldn't break something. Also it looks like anything which still would use the ID will fail after unregister (because unregister cleans up a lot), I'm not quite sure. So just reverting it looks like a save bet. Regards, Alexander
diff -puN drivers/rtc/class.c~revert-rtc-recycle-id-when-unloading-a-rtc-driver drivers/rtc/class.c --- a/drivers/rtc/class.c~revert-rtc-recycle-id-when-unloading-a-rtc-driver +++ a/drivers/rtc/class.c @@ -244,7 +244,6 @@ void rtc_device_unregister(struct rtc_de rtc_proc_del_device(rtc); device_unregister(&rtc->dev); rtc->ops = NULL; - ida_simple_remove(&rtc_ida, rtc->id); mutex_unlock(&rtc->ops_lock); put_device(&rtc->dev); }