lkml.org 
[lkml]   [2003]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] i2c driver fixes for 2.6.0-test5
On Tue, Sep 23, 2003 at 09:19:29AM -0700, Greg KH wrote:
> Ok, from my reading of this horrible chunk of code it does the
> following:
> - if this is a isa based controller, then we check the region
> that is to be used.
> - If it is already in use by someone else, then we skip it, and
> move on to the next address.
> - If it is not in use, then we pass the address down to the chip
> driver and let it try to find the chip at this address (it
> will do the reserving of the address space on its own.)
>
> So basically, check_region is pretty valid here, as we are trying to see
> if something else is already at this address, to try to prevent i2c
> drivers from stomping on each other. I replaced this with a
> request_region()/release_region() pair to get rid of the compiler
> warning.
>
> Is this your understanding too? Or do you think we should just get rid
> of the request_region() check here all together?

Yes, either we should get rid of it or move claiming the address to
the i2c midlayer (not sure whether that's a good idea). But an
opencoded check_region doesn't make any more sense than an explicit
one. And you're also looking at the pointer it returned after it's
already invalid again..

-
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-03-22 13:48    [W:0.057 / U:0.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site