Re: [RFC] [PATCH 2/2] ACPI: introduce ACPI ALS device driver

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

 



On Wed, 2009-09-23 at 16:11 +0800, Jonathan Cameron wrote:
> >> Are there any plausible race conditions associated with doing the allocation this way?
> > 
> > well, theoretically, yes.
> > simultaneous add calls may happen in hotplug case, but I don't think an
> > ACPI ALS device supports hotplug.
> That would make that point irrelevant!
> 
> Thinking further on this. What happens on a box that for some reason repeatedly inserts and
> removes this module?
> 
I don't see a problem in this case.

> This is the sort of problem idr's are meant to overcome.  They will cost you a bit
> in terms of complexity though.
> 
If we use generic names, say als0, als1, ..., it's worth using idr in
the ALS class driver.
But here, als_id is just used to fix the duplicate device name problem,
in a native ALS driver. IMO, it's overkill to implement the idr stuff.

thanks,
rui

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux