All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUGFIX PATCH] rtc: eliminate extra call of ida_simple_remove()
@ 2012-12-05 15:25 Lothar Waßmann
  2012-12-06 15:17 ` Alexander Holler
  0 siblings, 1 reply; 2+ messages in thread
From: Lothar Waßmann @ 2012-12-05 15:25 UTC (permalink / raw)
  To: Alessandro Zummo; +Cc: rtc-linux, linux-kernel, Lothar Waßmann

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().

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
---
 drivers/rtc/class.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c
index f8a0aab..5143629 100644
--- a/drivers/rtc/class.c
+++ b/drivers/rtc/class.c
@@ -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);
 	}
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-12-06 15:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-05 15:25 [BUGFIX PATCH] rtc: eliminate extra call of ida_simple_remove() Lothar Waßmann
2012-12-06 15:17 ` Alexander Holler

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.