i2c-i810.c bus driver

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

 



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

thanks,

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