Skip to contentSkip to conversation

rtc: eliminate extra call of ida_simple_remove()

PATCH In review Lothar Waßmann 2 participants 2 messages Dec 5, 2012 – Dec 6, 2012 Real time clock (RTC)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rtc: eliminate extra call of ida_simple_remove()

Unbinding an RTC chip driver from its device leads to the error message:
|ida_remove called for id=0 which is not allocated.

This is caused by a redundant call to ida_simple_remove() in rtc_device_unregister().
Eliminate the call in rtc_device_unregister() and only call the function in rtc_device_release().

---
 drivers/rtc/class.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
drivers/rtc/class.c +0 -1
index f8a0aab..5143629 100644
@@ -244,7 +244,6 @@ void rtc_device_unregister(struct rtc_device *rtc)
 		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);
 	}
Signature · 1 line
1.7.2.5
#1 lore raw

Am 05.12.2012 16:25, schrieb Lothar Waßmann:

Quoted 10 lines

Unbinding an RTC chip driver from its device leads to the error message:
|ida_remove called for id=0 which is not allocated.

This is caused by a redundant call to ida_simple_remove() in rtc_device_unregister().
Eliminate the call in rtc_device_unregister() and only call the function in rtc_device_release().

I've just discovered the same problem. Although I've removed the call to ida_simple_remove() in rtc_device_release() (for symmetry of register/unregister) I can offer a

Signed-off-by Alexander Holler

A

might make sense, but it should just remove a warning, so I don't know if that qualifies for the stable series.

Regards,

Alexander