From patchwork Wed Jul 27 09:12:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Donggeun Kim X-Patchwork-Id: 1011012 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p6R9Diup004823 for ; Wed, 27 Jul 2011 09:13:44 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753570Ab1G0JNn (ORCPT ); Wed, 27 Jul 2011 05:13:43 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:49081 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753188Ab1G0JNm (ORCPT ); Wed, 27 Jul 2011 05:13:42 -0400 Received: from epcpsbgm2.samsung.com (mailout4.samsung.com [203.254.224.34]) by mailout4.samsung.com (Oracle Communications Messaging Exchange Server 7u4-19.01 64bit (built Sep 7 2010)) with ESMTP id <0LOZ000Z4IXFYXL0@mailout4.samsung.com>; Wed, 27 Jul 2011 18:13:41 +0900 (KST) X-AuditID: cbfee61b-b7c3dae000002cb8-23-4e2fd6c42f1c Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (MMPCPMTA) with SMTP id 7F.D7.11448.4C6DF2E4; Wed, 27 Jul 2011 18:13:40 +0900 (KST) Received: from TNRNDGASPAPP1.tn.corp.samsungelectronics.net ([165.213.149.150]) by mmp2.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0LOZ00BRZIYTWF@mmp2.samsung.com>; Wed, 27 Jul 2011 18:13:41 +0900 (KST) Received: from localhost.localdomain ([165.213.219.89]) by TNRNDGASPAPP1.tn.corp.samsungelectronics.net with Microsoft SMTPSVC(6.0.3790.4675); Wed, 27 Jul 2011 18:14:01 +0900 Date: Wed, 27 Jul 2011 18:12:57 +0900 From: Donggeun Kim Subject: [PATCH v2] backlight/platform_lcd: change set power function parameter in plat_lcd_data To: linux-fbdev@vger.kernel.org Cc: rpurdie@rpsys.net, lethal@linux-sh.org, linux-kernel@vger.kernel.org, kyungmin.park@samsung.com, dh09.lee@samsung.com, dg77.kim@samsung.com Message-id: <1311757977-12694-1-git-send-email-dg77.kim@samsung.com> X-Mailer: git-send-email 1.7.4.1 Content-transfer-encoding: 7BIT X-OriginalArrivalTime: 27 Jul 2011 09:14:01.0692 (UTC) FILETIME=[864EA9C0:01CC4C3D] X-Brightmail-Tracker: AAAAAA== Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 27 Jul 2011 09:13:44 +0000 (UTC) The set_power function in platdata for platform_lcd driver has originally two parameters. The first parameter type is struct plat_lcd_data * and the second parameter type is unsigned int . In some cases, it is needed to get pointer typed 'struct device' in order to call regulator_* functions. This patch allows users to define a set_power function which control regulators related to platform_lcd device. Currently, variables in struct plat_lcd_data are not used in several set_power functions which are defined at arch/arm/ directory. Changes since v1 : * Remove compile warning message by including another heeder file Signed-off-by: Donggeun Kim Signed-off-by: Donghwa Lee Signed-off-by: Kyungmin Park --- drivers/video/backlight/platform_lcd.c | 2 +- include/video/platform_lcd.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/video/backlight/platform_lcd.c b/drivers/video/backlight/platform_lcd.c index 302330a..cf23a3f 100644 --- a/drivers/video/backlight/platform_lcd.c +++ b/drivers/video/backlight/platform_lcd.c @@ -49,7 +49,7 @@ static int platform_lcd_set_power(struct lcd_device *lcd, int power) if (power == FB_BLANK_POWERDOWN || plcd->suspended) lcd_power = 0; - plcd->pdata->set_power(plcd->pdata, lcd_power); + plcd->pdata->set_power(lcd, lcd_power); plcd->power = power; return 0; diff --git a/include/video/platform_lcd.h b/include/video/platform_lcd.h index ad3bdfe..5d7e943 100644 --- a/include/video/platform_lcd.h +++ b/include/video/platform_lcd.h @@ -10,12 +10,13 @@ * published by the Free Software Foundation. * */ +#include struct plat_lcd_data; struct fb_info; struct plat_lcd_data { - void (*set_power)(struct plat_lcd_data *, unsigned int power); + void (*set_power)(struct lcd_device *, unsigned int power); int (*match_fb)(struct plat_lcd_data *, struct fb_info *); };