i2c-i810.c bus driver

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

 



On Sat, Sep 20, 2003 at 05:07:54PM -0400, Mark M. Hoffman wrote:
> * Greg KH <greg at kroah.com> [2003-09-15 11:30:26 -0700]:
> > Ugh, in looking over the bus drivers that are currently in the cvs tree,
> > but not in the kernel tree, I ran accross this horrible bit of code in
> > the i2c-i810.c driver:
> > 
> > static unsigned char *mem;
> > 
> > static inline void outlong(unsigned int dat, int off)
> > {
> > 	*((unsigned int *) (mem + off)) = dat;
> > }
> > 
> > static inline unsigned int readlong(int off)
> > {
> > 	return *((unsigned int *) (mem + off));
> > }
> > 
> > Will someone please fix this up properly to not directly access memory!
> > That is not portable at all, and will do bad things on non-i386 based
> > hardware platforms.
> > 
> > After that's done, I'll worry about porting it to 2.6, but not before...
> 
> Is this what you want?  If so I'll update it (and the other two).
> Er, I'll get rid of the outlong/readlong indirection too...

Yes, this is the proper way to do things.

Thanks for looking into this and making the changes.

greg k-h



[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux