Re: [PATCH] Platform: Samsung Q10 backlight driver

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

 



On Wed, Feb 16, 2011 at 03:58:07PM -0800, Greg KH wrote:
> On Wed, Feb 16, 2011 at 11:30:29PM +0000, Frederick van der Wyck wrote:
> > +
> > +static void samsungq10_bl_send_intensity(struct backlight_device *bd)
> > +{
> > +	int brightness = bd->props.brightness;
> > +
> > +	if (!samsungq10_suspended) {
> > +		while (inb(0x64)&2)
> > +			;
> > +		outb_p(0xbe, 0x64);
> > +		while (inb(0x64)&2)
> > +			;
> > +		outb_p(0x89, 0x60);
> > +		while (inb(0x64)&2)
> > +			;
> > +		outb_p(0x91, 0x60);
> > +		while (inb(0x64)&2)
> > +			;
> 
> Potentially endless loops are not good, please timeout if you don't get
> the proper value over a time.

Double not good since it is i8042 registers. Use
i8042_lock_chip()/i8042_command()/i8042_unlock_chip().

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


[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux