Re: [PATCH 4/8] RTC subsystem, proc interface

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

 



On Sunday 08 January 2006 21:04, Alessandro Zummo wrote:
> On Sun, 8 Jan 2006 20:56:29 -0500
> Dmitry Torokhov <[email protected]> wrote:
> 
> > > +static void rtc_proc_remove_device(struct class_device *class_dev,
> > > +                                             struct class_interface *class_intf)
> > > +{
> > > +       down(&rtc_sem);
> > > +       if (rtc_dev == class_dev) {
> > > +               remove_proc_entry("driver/rtc", NULL);
> > > +               rtc_dev = NULL;
> > > +       }
> > > +       up(&rtc_sem);
> > > +}
> > 
> > What if I happen to remove (unregister) rtc devices in order other
> > than they were registered in? You need a counter there instead of
> > storing the first device created.
> 
>  Only the first device that registers will get the /proc/driver/rtc
>  entry, which will be removed when the driver unregisters.
> 
>  /proc/driver/rtc is a legacy interface, thus supporting it
>  for more than one RTC is useless. Any system that uses
>  more than one RTCs should access them via /dev/rtcX or
>  via sysfs.
> 

Oh, I see. Ignore me then... 

-- 
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