From patchwork Tue Sep 17 05:01:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jingoo Han X-Patchwork-Id: 2900701 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9E3C89F1BF for ; Tue, 17 Sep 2013 05:01:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 789BE20212 for ; Tue, 17 Sep 2013 05:01:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 83600201B6 for ; Tue, 17 Sep 2013 05:01:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751275Ab3IQFBD (ORCPT ); Tue, 17 Sep 2013 01:01:03 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:10082 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751238Ab3IQFBC (ORCPT ); Tue, 17 Sep 2013 01:01:02 -0400 Received: from epcpsbgr4.samsung.com (u144.gpu120.samsung.co.kr [203.254.230.144]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MT900FQM79ICKK0@mailout3.samsung.com> for linux-fbdev@vger.kernel.org; Tue, 17 Sep 2013 14:01:01 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.48]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id B1.CA.31253.D02E7325; Tue, 17 Sep 2013 14:01:01 +0900 (KST) X-AuditID: cbfee690-b7f3b6d000007a15-a5-5237e20d9362 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id DE.BE.09055.D02E7325; Tue, 17 Sep 2013 14:01:01 +0900 (KST) Received: from DOJG1HAN03 ([12.23.120.99]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MT9000LS79PY510@mmp1.samsung.com>; Tue, 17 Sep 2013 14:01:01 +0900 (KST) From: Jingoo Han To: 'Tomi Valkeinen' Cc: 'Jean-Christophe PLAGNIOL-VILLARD' , linux-fbdev@vger.kernel.org, 'Jingoo Han' References: <000401ceb361$d84c4600$88e4d200$%han@samsung.com> In-reply-to: <000401ceb361$d84c4600$88e4d200$%han@samsung.com> Subject: [PATCH 06/19] video: pxafb: use dev_get_platdata() Date: Tue, 17 Sep 2013 14:01:01 +0900 Message-id: <000b01ceb362$e78c46a0$b6a4d3e0$%han@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac6zYdQuTiueM9xuSEGq26qTfKM1MwAAOqRw Content-language: ko x-cr-hashedpuzzle: AH+6 Fe7G H+cx NI3z Ph9D StxK USoL WrG0 X+Oy YfoT Yi/S aa8G fQCT k684 mm9l pbS1; 4; agBnADEALgBoAGEAbgBAAHMAYQBtAHMAdQBuAGcALgBjAG8AbQA7AGwAaQBuAHUAeAAtAGYAYgBkAGUAdgBAAHYAZwBlAHIALgBrAGUAcgBuAGUAbAAuAG8AcgBnADsAcABsAGEAZwBuAGkAbwBqAEAAagBjAHIAbwBzAG8AZgB0AC4AYwBvAG0AOwB0AG8AbQBpAC4AdgBhAGwAawBlAGkAbgBlAG4AQAB0AGkALgBjAG8AbQA=; Sosha1_v1; 7; {3820B637-B2B9-4274-87EC-900FB2BBD21D}; agBnADEALgBoAGEAbgBAAHMAYQBtAHMAdQBuAGcALgBjAG8AbQA=; Tue, 17 Sep 2013 05:00:54 GMT; WwBQAEEAVABDAEgAIAAwADYALwAxADkAXQA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ZBBsf3qltcXniJ1eJE3wdW i3UPXzBZrJ9/i82BxePVhTssHn1bVjF6HL+xncnj8ya5AJaoBkabjNTElNQihdS85PyUzLx0 WyXv4HjneFMzA0NdQ0sLcyWFvMTcVFslF58AXbfMHKCdSgpliTmlQKGAxOJiJX07TBNCQ9x0 LWAaI3R9Q4LgeowM0EDCOsaMrpXSBeckKqb+/sPUwLhRpIuRk0NCwETi7/l/jBC2mMSFe+vZ uhi5OIQEFjFKPL1wlwXC+cUo8bdhLytIFZuAmsSXL4fZQWwRAR2JSYt6mEGKmAUaGSVaup+D FQkJ2ErMfnGVBcTmFLCT2D9hLpgtLGAt8e7iIrB1LAKqEtf/HwIbxAtUv+PRVDYIW1Dix+R7 YPXMAloS63ceZ4Kw5SU2r3kLtIwD6FR1iUd/dSFuMJI4cu8wG0SJiMS+F+8YQe6REPjAIvHx 5T5miNdMJf6++888gVFkFpIVs5CsmIVkxSwksxYwsqxiFE0tSC4oTkrPNdQrTswtLs1L10vO z93ECE4Tz6R2MK5ssDjEKMDBqMTDO0PKPEiINbGsuDL3EKMEB7OSCG+YLlCINyWxsiq1KD++ qDQntfgQYzIwBCYyS4km5wNTWF5JvKGxiZmRpZGZhZGJuTlpwkrivAdarQOFBNITS1KzU1ML UotgtjBxcEo1MPqbaZzp+OWp+pXx1q3Ly1bF7ez8PaeCQbvWWK5umUPLlpT7U0MZWy+ZBCW/ CL39abXMkTtHV/3gnN2lOXmB5HkdAbaHYTq93xKKUv6In7G272Pbc2/vO0eX+mvbbx/2nmIq tX/FcaU7ck3iF/8WvP2Wdz6wpXhKdqDeG/bNXFdWmPNYuq6a0q3EUpyRaKjFXFScCABFlaD3 VwMAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. This is a cosmetic change to make the code simpler and enhance the readability. Signed-off-by: Jingoo Han --- drivers/video/pxafb.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c index eca2de4..1ecd9ce 100644 --- a/drivers/video/pxafb.c +++ b/drivers/video/pxafb.c @@ -457,7 +457,7 @@ static int pxafb_adjust_timing(struct pxafb_info *fbi, static int pxafb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) { struct pxafb_info *fbi = (struct pxafb_info *)info; - struct pxafb_mach_info *inf = fbi->dev->platform_data; + struct pxafb_mach_info *inf = dev_get_platdata(fbi->dev); int err; if (inf->fixed_modes) { @@ -1230,7 +1230,7 @@ static unsigned int __smart_timing(unsigned time_ns, unsigned long lcd_clk) static void setup_smart_timing(struct pxafb_info *fbi, struct fb_var_screeninfo *var) { - struct pxafb_mach_info *inf = fbi->dev->platform_data; + struct pxafb_mach_info *inf = dev_get_platdata(fbi->dev); struct pxafb_mode_info *mode = &inf->modes[0]; unsigned long lclk = clk_get_rate(fbi->clk); unsigned t1, t2, t3, t4; @@ -1258,14 +1258,14 @@ static void setup_smart_timing(struct pxafb_info *fbi, static int pxafb_smart_thread(void *arg) { struct pxafb_info *fbi = arg; - struct pxafb_mach_info *inf = fbi->dev->platform_data; + struct pxafb_mach_info *inf = dev_get_platdata(fbi->dev); if (!inf->smart_update) { pr_err("%s: not properly initialized, thread terminated\n", __func__); return -EINVAL; } - inf = fbi->dev->platform_data; + inf = dev_get_platdata(fbi->dev); pr_debug("%s(): task starting\n", __func__); @@ -1793,7 +1793,7 @@ static struct pxafb_info *pxafb_init_fbinfo(struct device *dev) { struct pxafb_info *fbi; void *addr; - struct pxafb_mach_info *inf = dev->platform_data; + struct pxafb_mach_info *inf = dev_get_platdata(dev); /* Alloc the pxafb_info and pseudo_palette in one step */ fbi = kmalloc(sizeof(struct pxafb_info) + sizeof(u32) * 16, GFP_KERNEL); @@ -1855,7 +1855,7 @@ static struct pxafb_info *pxafb_init_fbinfo(struct device *dev) #ifdef CONFIG_FB_PXA_PARAMETERS static int parse_opt_mode(struct device *dev, const char *this_opt) { - struct pxafb_mach_info *inf = dev->platform_data; + struct pxafb_mach_info *inf = dev_get_platdata(dev); const char *name = this_opt+5; unsigned int namelen = strlen(name); @@ -1914,7 +1914,7 @@ done: static int parse_opt(struct device *dev, char *this_opt) { - struct pxafb_mach_info *inf = dev->platform_data; + struct pxafb_mach_info *inf = dev_get_platdata(dev); struct pxafb_mode_info *mode = &inf->modes[0]; char s[64]; @@ -2102,7 +2102,7 @@ static int pxafb_probe(struct platform_device *dev) dev_dbg(&dev->dev, "pxafb_probe\n"); - inf = dev->dev.platform_data; + inf = dev_get_platdata(&dev->dev); ret = -ENOMEM; fbi = NULL; if (!inf)