From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Machek Subject: Re: Thinkpad ACPI led -- it keeps blinking Date: Sun, 28 Apr 2019 00:32:08 +0200 Message-ID: <20190427223207.GA3585@amd> References: <20190426123513.GA18172@amd> <20190426214246.GA24966@amd> <84fac57d-1121-a1da-fb45-16a2521bdef9@gmail.com> <20190427193411.GA9709@amd> <2578a614-beb9-1c9d-9f74-208a8a7ab64f@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6879095210923642472==" Return-path: In-Reply-To: <2578a614-beb9-1c9d-9f74-208a8a7ab64f-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ibm-acpi-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Jacek Anaszewski Cc: ibm-acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, ibm-acpi-N3TV7GIv+o9fyO9Q7EP/yw@public.gmane.org, linux-leds-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, platform-driver-x86-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-leds@vger.kernel.org --===============6879095210923642472== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NzB8fVQJ5HfG6fxh" Content-Disposition: inline --NzB8fVQJ5HfG6fxh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! This fixes one problem: Pavel Signed-off-by: Pavel Machek diff --git a/drivers/leds/led-core.c b/drivers/leds/led-core.c index e3da7c0..d795d8f 100644 --- a/drivers/leds/led-core.c +++ b/drivers/leds/led-core.c @@ -164,8 +164,14 @@ static void led_blink_setup(struct led_classdev *led_c= dev, unsigned long *delay_on, unsigned long *delay_off) { + while (work_pending(&led_cdev->set_brightness_work)) { + printk("Waiting for brightness set to finish\n"); + schedule(); + } + =20 if (!test_bit(LED_BLINK_ONESHOT, &led_cdev->work_flags) && led_cdev->blink_set && + /* This can sleep */ !led_cdev->blink_set(led_cdev, delay_on, delay_off)) return; =20 --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --NzB8fVQJ5HfG6fxh Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlzE2GcACgkQMOfwapXb+vKl/ACeLRoqIr8SQO8NSjC99Bqkr/uQ azAAoLbC9v1YzD3qkvL7Q0njYSmCHtpw =rCcb -----END PGP SIGNATURE----- --NzB8fVQJ5HfG6fxh-- --===============6879095210923642472== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============6879095210923642472== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ibm-acpi-devel mailing list ibm-acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel --===============6879095210923642472==--