From patchwork Thu Mar 18 03:38:15 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Wu X-Patchwork-Id: 47985 X-Patchwork-Delegate: apw@canonical.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 454D7B7CED for ; Thu, 18 Mar 2010 14:38:37 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1Ns6Z1-0002Sr-Bq; Thu, 18 Mar 2010 03:38:27 +0000 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1Ns6Z0-0002Sm-2D for kernel-team@lists.ubuntu.com; Thu, 18 Mar 2010 03:38:26 +0000 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1Ns6Yz-0005XN-Ro for ; Thu, 18 Mar 2010 03:38:25 +0000 Received: from [219.142.224.141] (helo=canonical.com) by hutte.canonical.com with esmtpsa (TLS-1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1Ns6Yy-0004sS-Iu for kernel-team@lists.ubuntu.com; Thu, 18 Mar 2010 03:38:25 +0000 From: Bryan Wu To: kernel-team@lists.ubuntu.com Subject: [PATCH] leds-mc13892: fix suspend/resume Date: Thu, 18 Mar 2010 11:38:15 +0800 Message-Id: <1268883495-9382-1-git-send-email-bryan.wu@canonical.com> X-Mailer: git-send-email 1.7.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com From: Jeremy Kerr BugLink: http://bugs.launchpad.net/bugs/537083 The workqueue update for the leds-mc13892 driver introduced a regression where machine would no longer suspend and resume, as the wrong type was being retrieved from the platform drvdata. This change updates the suspend and resume functions to use the struct mc13892_led type. Signed-off-by: Jeremy Kerr Signed-off-by: Bryan Wu Acked-by: Andy Whitcroft --- drivers/leds/leds-mc13892.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/leds/leds-mc13892.c b/drivers/leds/leds-mc13892.c index 464bec9..02e7c9d 100644 --- a/drivers/leds/leds-mc13892.c +++ b/drivers/leds/leds-mc13892.c @@ -121,17 +121,17 @@ err_free: #ifdef CONFIG_PM static int mc13892_led_suspend(struct platform_device *dev, pm_message_t state) { - struct led_classdev *led_cdev = platform_get_drvdata(dev); + struct mc13892_led *led = platform_get_drvdata(dev); - led_classdev_suspend(led_cdev); + led_classdev_suspend(&led->cdev); return 0; } static int mc13892_led_resume(struct platform_device *dev) { - struct led_classdev *led_cdev = platform_get_drvdata(dev); + struct mc13892_led *led = platform_get_drvdata(dev); - led_classdev_resume(led_cdev); + led_classdev_resume(&led->cdev); return 0; } #else