lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 16 Feb 2011 17:05:12 -0800
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Greg KH <gregkh@...e.de>
Cc:	Frederick van der Wyck <fvanderwyck@...il.com>, mjg@...hat.com,
	platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Platform: Samsung Q10 backlight driver

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 linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists