Re: [RFC][PATCH 7/7] RTC subsystem, test device/driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux