From patchwork Wed Feb 26 01:17:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jingoo Han X-Patchwork-Id: 324165 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 103742C0040 for ; Wed, 26 Feb 2014 12:17:16 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750780AbaBZBRP (ORCPT ); Tue, 25 Feb 2014 20:17:15 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:32884 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750764AbaBZBRO (ORCPT ); Tue, 25 Feb 2014 20:17:14 -0500 Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N1K00CUXWWQA9D0@mailout4.samsung.com> for linux-pwm@vger.kernel.org; Wed, 26 Feb 2014 10:17:14 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.51]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id C1.04.09028.9904D035; Wed, 26 Feb 2014 10:17:13 +0900 (KST) X-AuditID: cbfee68e-b7f566d000002344-a3-530d4099dc0e Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 27.8C.29263.9904D035; Wed, 26 Feb 2014 10:17:13 +0900 (KST) Received: from DOJG1HAN03 ([12.36.166.146]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N1K0056WWWP5W50@mmp2.samsung.com>; Wed, 26 Feb 2014 10:17:13 +0900 (KST) From: Jingoo Han To: 'Thierry Reding' Cc: linux-pwm@vger.kernel.org, 'Jingoo Han' , 'Eric Miao' Subject: [PATCH] pwm: pxa: Use of_match_ptr() Date: Wed, 26 Feb 2014 10:17:13 +0900 Message-id: <002c01cf3290$7ad36ef0$707a4cd0$%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 Content-language: ko Thread-index: Ac8ykHq15zcjzhZGROmCSsB/We7X8g== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrAIsWRmVeSWpSXmKPExsVy+t8zY92ZDrzBBj3ztC12tB1ns7i88BKr xd27qxgtfu6ax+LA4rFz1l12j74tqxg9Pm+SC2CO4rJJSc3JLEst0rdL4Mp42d/LXLCQvaLz 1Xy2BsavrF2MnBwSAiYSb7fdZoewxSQu3FvP1sXIxSEksIxRYtG0LjaYosM7OhkhEtMZJc4s WMEC4fxmlNi7dwcLSBWbgJrEly+HwUaJCOhLXLp+CWwFs0CGROseiBphAV2Jlsb/QJM4OFgE VCXm/QoACfMK2EpMO97BBmELSvyYfI8FolVLYv3O40wQtrzE5jVvmUFaJQTUJR791YUIi0js e/GOEWKrnsST3X3sIKdJCKxil9i0bBvYCSwCAhLfJh9igeiVldh0gBniL0mJgytusExgFJuF ZPMsJJtnIdk8C8m6BYwsqxhFUwuSC4qT0ouM9IoTc4tL89L1kvNzNzFCYqtvB+PNA9aHGJOB 1k9klhJNzgfGZl5JvKGxmZGFqYmpsZG5pRlpwkrivIseJgUJCaQnlqRmp6YWpBbFF5XmpBYf YmTi4JRqYBRy0ZlzxOLZr8SjpydErm5oSH2tfr6W89aRDuEJJnYT5EuundFSkDvsd3zv1Huz FH5nfOOY6P9+zbJZlwJf2p35m/t3YTvvlL2ThThst2vm5l5rva/NxjSfsXzbm+8rkkpWheYX 1n6Yt770grlIZv7cuB076voMJLfocRm9Z3h16c+saw2bp29XYinOSDTUYi4qTgQAvLzX+sMC AAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplleLIzCtJLcpLzFFi42I5/e+xoO5MB95gg9U31S12tB1ns7i88BKr xd27qxgtfu6ax+LA4rFz1l12j74tqxg9Pm+SC2COamC0yUhNTEktUkjNS85PycxLt1XyDo53 jjc1MzDUNbS0MFdSyEvMTbVVcvEJ0HXLzAFap6RQlphTChQKSCwuVtK3wzQhNMRN1wKmMULX NyQIrsfIAA0krGPMeNnfy1ywkL2i89V8tgbGr6xdjJwcEgImEod3dDJC2GISF+6tZ+ti5OIQ EpjOKHFmwQoWCOc3o8TevTtYQKrYBNQkvnw5zA5iiwjoS1y6fglsErNAhkTrHogaYQFdiZbG /0BTOThYBFQl5v0KAAnzCthKTDvewQZhC0r8mHyPBaJVS2L9zuNMELa8xOY1b5lBWiUE1CUe /dWFCItI7HvxjhFiq57Ek9197BMYBWYhmTQLyaRZSCbNQtK+gJFlFaNoakFyQXFSeq6hXnFi bnFpXrpecn7uJkZw5D6T2sG4ssHiEKMAB6MSD28AC2+wEGtiWXFl7iFGCQ5mJRFei288wUK8 KYmVValF+fFFpTmpxYcYk4H+nMgsJZqcD0wqeSXxhsYmZkaWRmYWRibm5qQJK4nzHmi1DhQS SE8sSc1OTS1ILYLZwsTBKdXAqLD4i9SDep9Hp99Vi8zfOTnz7Ia710x2MD3YOrs2Qfsh99H3 jjmT0yzsItM+3unUb80yUd16I7Jub+hJr3XFH1mZPl0OmN0Qc/CyVuK6PaWd6vdbhRYvTpHg eX8zg/nA5P85yl8EO33/zbe+d/RAgkX1tikxZzp2LPLmNivf3tpYsfDuD8FL85RYijMSDbWY i4oTAWtCc50gAwAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-pwm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pwm@vger.kernel.org Use of_match_ptr(), because of_match_ptr() returns NULL pointer when CONFIG_OF is disabled. Signed-off-by: Jingoo Han --- drivers/pwm/pwm-pxa.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pwm/pwm-pxa.c b/drivers/pwm/pwm-pxa.c index 8d99573..7eb2c18 100644 --- a/drivers/pwm/pwm-pxa.c +++ b/drivers/pwm/pwm-pxa.c @@ -140,8 +140,6 @@ static struct of_device_id pwm_of_match[] = { { } }; MODULE_DEVICE_TABLE(of, pwm_of_match); -#else -#define pwm_of_match NULL #endif static const struct platform_device_id *pxa_pwm_get_id_dt(struct device *dev) @@ -228,7 +226,7 @@ static struct platform_driver pwm_driver = { .driver = { .name = "pxa25x-pwm", .owner = THIS_MODULE, - .of_match_table = pwm_of_match, + .of_match_table = of_match_ptr(pwm_of_match), }, .probe = pwm_probe, .remove = pwm_remove,