lkml.org 
[lkml]   [2005]   [Dec]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC][PATCH 7/7] RTC subsystem, test device/driver
Date
On Monday 26 December 2005 13:59, Alessandro Zummo wrote:
> +struct platform_device test_dev_zero = {
> + .name = "rtc-test",
> + .id = 0,
> + .dev.release = test_release,
> +};
> +
> +struct platform_device test_dev_one = {
> + .name = "rtc-test",
> + .id = 1,
> + .dev.release = test_release,
> +};
> +

You should never ever statically allicate devices that can be unregistered.
Guess what will happen if one does this:

rmmod rtc_test < /sys/class/rtc/rtcX/date

where rctX is class device created by rtc-test0 or rtc-test1.

--
Dmitry
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-12-27 00:48    [W:3.107 / U:0.824 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site