From patchwork Thu Jan 25 07:34:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akash Gajjar X-Patchwork-Id: 10183725 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4CCA160233 for ; Thu, 25 Jan 2018 07:35:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3CA3E28401 for ; Thu, 25 Jan 2018 07:35:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2FEC628A22; Thu, 25 Jan 2018 07:35:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B03F028401 for ; Thu, 25 Jan 2018 07:35:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751206AbeAYHfO (ORCPT ); Thu, 25 Jan 2018 02:35:14 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:39578 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751081AbeAYHfN (ORCPT ); Thu, 25 Jan 2018 02:35:13 -0500 Received: by mail-wm0-f67.google.com with SMTP id b21so13038229wme.4; Wed, 24 Jan 2018 23:35:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=aovb8yiziZCpIPqO+kHgGysA3EfVdIAIYvrRqVeQilw=; b=GEzP1tWLHOg5N35+rWFn/3kpZpNKFUqG8aK4pWs2UZPI7mXVmdRhKcHgF9MGzjvZqU FdDSCjmtpY6pwderKQ0RCVwTFHFSZEXWrocd59IjQmmMlf7eJdZtVO5DISJVwXadd2OB mni5monYoKC2vsnim1kJ8DKCMm4b+/fu26ouILWvyerOIrD7pT35z9DcJ8sozaPBeLgr aqNeqffAhvKCpKXGFrXKrMHIxcpK4uzA8ciyMjs6ld9Z5wPxQCDMcm/eDBbGVkqcVF9h UPIqaHSKEgfOU+EKds3um4I7T6CjSCoxiXWjZRxMjvFGgRtsjzUndM4Bj8HA+ykFa42F Ta+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=aovb8yiziZCpIPqO+kHgGysA3EfVdIAIYvrRqVeQilw=; b=uOBiUPMqSuv1vbZjX3GO67mx44MphrNViVs6MAPvR058RtNVspM6gH97hhLneFMlTf rcaZ8mES4yknKiBacZuJvCOaaYkhfEi9zQxi+PqYqSe2GwuM478GNCDwJFnUHFC7N1wX 4iJludU7Hmtc4hYzBcVWx4waeoCSl3AIlqcZXOjLU5YE0xXCn/aYwdYzE257UnweMg0q tqcopjp3xGTFJRqsFrKnru/o5uJ3EvI2XHrzojGgJLgi83m00EOShhzWICYL7eIL8PpY 527LhPhu00M8L1TtUYbKScVXAvsE91gyo941uXtKP0/GNDhGOsgivxIDMSBVlzZfeiqj yylQ== X-Gm-Message-State: AKwxytcbttbZVVRoMM7XTrNu0ujkWniGD2gCZEkGmieG5vfJ0EZUjbQM E0PFuHqCiJdo1YbDi7c4NOk= X-Google-Smtp-Source: AH8x227y/zM5SyaLl7j4UhD/l++NuvVddeecr7hJct78gS8Ug6E6Uto9lgnfRH1bnrhlOXSQAcnCog== X-Received: by 10.28.67.194 with SMTP id q185mr6473619wma.76.1516865712167; Wed, 24 Jan 2018 23:35:12 -0800 (PST) Received: from inndt279.inn.mentorg.com (nat-inn.mentorg.com. [192.94.34.34]) by smtp.gmail.com with ESMTPSA id h194sm820324wma.8.2018.01.24.23.35.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 24 Jan 2018 23:35:11 -0800 (PST) From: Akash Gajjar Cc: gajjar04akash@gmail.com, Akash Gajjar , Laurent Pinchart , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] media: leds: as3645a: Add CONFIG_OF support Date: Thu, 25 Jan 2018 13:04:36 +0530 Message-Id: <1516865677-16006-1-git-send-email-gajjar04akash@gmail.com> X-Mailer: git-send-email 1.9.1 To: unlisted-recipients:; (no To-header on input) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Akash Gajjar Witth this changes, the driver builds with CONFIG_OF support Signed-off-by: Akash Gajjar --- drivers/media/i2c/as3645a.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/media/i2c/as3645a.c b/drivers/media/i2c/as3645a.c index af5db71..24233fa 100644 --- a/drivers/media/i2c/as3645a.c +++ b/drivers/media/i2c/as3645a.c @@ -858,6 +858,14 @@ static int as3645a_remove(struct i2c_client *client) }; MODULE_DEVICE_TABLE(i2c, as3645a_id_table); +#if IS_ENABLED(CONFIG_OF) +static const struct of_device_id as3645a_of_match[] = { + { .compatible = "ams,as3645a", }, + { /* sentinel */ }, +}; +MODULE_DEVICE_TABLE(of, as3645a_of_match); +#endif + static const struct dev_pm_ops as3645a_pm_ops = { .suspend = as3645a_suspend, .resume = as3645a_resume, @@ -867,6 +875,7 @@ static int as3645a_remove(struct i2c_client *client) .driver = { .name = AS3645A_NAME, .pm = &as3645a_pm_ops, + .of_match_table = of_match_ptr(as3645a_of_match), }, .probe = as3645a_probe, .remove = as3645a_remove,