]> git.karo-electronics.de Git - karo-tx-linux.git/commit
rtc: recycle id when unloading a rtc driver
authorVincent Palatin <vpalatin@chromium.org>
Wed, 26 Sep 2012 01:34:34 +0000 (11:34 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 27 Sep 2012 07:28:11 +0000 (17:28 +1000)
commit92594538467120574a1175bf06132f96d189a712
treede21b4a0a5a0b7a3828050a30b4e133c41d54621
parentac232f030df836ff828464b58325b55df69c4cda
rtc: recycle id when unloading a rtc driver

When calling rtc_device_unregister, we are not freeing the id used by the
driver.  So when doing a unload/load cycle for a RTC driver (e.g.  rmmod
rtc_cmos && modprobe rtc_cmos), its id is incremented by one.  As a
consequence, we no longer have neither an rtc0 driver nor a
/proc/driver/rtc (as it only exists for the first driver).

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/rtc/class.c