From patchwork Mon Aug 28 17:24:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 137069 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a7d1:0:b0:3f2:4152:657d with SMTP id p17csp3494536vqm; Mon, 28 Aug 2023 11:03:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF2KWgKd4BT6hLSNXf53JRFM7rWBLuniFTnGMR3cvjazK+sP+QWHHYWXgEU34q6urcckClK X-Received: by 2002:a17:907:6087:b0:9a2:1bd8:a6a with SMTP id ht7-20020a170907608700b009a21bd80a6amr9773519ejc.41.1693245795076; Mon, 28 Aug 2023 11:03:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693245795; cv=none; d=google.com; s=arc-20160816; b=W6Xbq9v2AQYkhUVYM/KKil584p5OoNqRVrb1RIf77BeVRbd09J3wXqrjXC2e7R/+ye B192q7y4mMDN1BhlIBwpZazhuKJTtrn7sXrKvACdBSa1wBxjR6bmX7padGl3G0ZHnFsT lUKah79SSGIMXsMRYxAfCD2iNQXDcxTrLPWcJui813tIsykngz0tjC4BtsxWctiUB//n VdzV8LV7lKzkmQHyzdP8AuXC7HK2BUcuxX3Um4SKe9qF217qX7qV+1PJTf/9HCClj4O0 SlCwPacLS9YsWlrMoJi6rPEPOe3UV1fzS3EeFFwEek/k56qemAlCPCq3/MgI1FteTaVw CotQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=3fC685Q7HGbDMhiTH6n+hk/TY/MKPHtwORGwXE3rgTg=; fh=D7X4m3h48WzxV5TdmXPiwihBUdg5PgMI8yRqASSjm0U=; b=cutrgZW43YJHCiR/j+FMCk6ex6GNNOXHC5B2266WetdVTpC3DCpRGEf6nLe7vz314X uWQr/ul/LczCuqkeU5lYae2M+tL5l4d0v3ZwSn3c8EQoi5nlVuGMa0LIIL3pW2o1vAxp TWc6abO9SPm+0q2jTkymthCQ8keqm0qdtbi+tY4dVxBWI+TVTddzJkVY2a2Q0Ddkmzqd C4ea5YJkgUhG81ygeSj2F5BTbNsRb2qxecXGxmXd0tqRGXHZjNWEA+f5MkZSWP6YVDSZ S4p6JgSg0fr3+HtAIxpjxCeVqXyfxH9wy5545miH1ZLh4mF8XhTRjcLXeEjs5vCOjvis Yiag== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id us11-20020a170906bfcb00b009a0d5192b08si4631752ejb.725.2023.08.28.11.02.39; Mon, 28 Aug 2023 11:03:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231722AbjH1RYp (ORCPT + 99 others); Mon, 28 Aug 2023 13:24:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231728AbjH1RY3 (ORCPT ); Mon, 28 Aug 2023 13:24:29 -0400 Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 14B9D103 for ; Mon, 28 Aug 2023 10:24:26 -0700 (PDT) X-IronPort-AV: E=Sophos;i="6.02,208,1688396400"; d="scan'208";a="177943381" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 29 Aug 2023 02:24:26 +0900 Received: from localhost.localdomain (unknown [10.226.92.234]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 34B01402D0BB; Tue, 29 Aug 2023 02:24:24 +0900 (JST) From: Biju Das To: Liam Girdwood , Mark Brown Cc: Biju Das , linux-kernel@vger.kernel.org, Andy Shevchenko Subject: [PATCH v2 2/2] regulator: pv880x0: Drop CONFIG_OF ifdeffery Date: Mon, 28 Aug 2023 18:24:17 +0100 Message-Id: <20230828172417.113631-3-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230828172417.113631-1-biju.das.jz@bp.renesas.com> References: <20230828172417.113631-1-biju.das.jz@bp.renesas.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1775496903010772309 X-GMAIL-MSGID: 1775496903010772309 Get rid of ugly CONFIG_OF ifdeffery by adding mod_devicetable.h include. Suggested-by: Andy Shevchenko Signed-off-by: Biju Das --- v2: * New patch. --- drivers/regulator/pv88080-regulator.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/regulator/pv88080-regulator.c b/drivers/regulator/pv88080-regulator.c index 4009239b6784..2404df78d639 100644 --- a/drivers/regulator/pv88080-regulator.c +++ b/drivers/regulator/pv88080-regulator.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -513,7 +514,6 @@ static int pv88080_i2c_probe(struct i2c_client *i2c) return 0; } -#ifdef CONFIG_OF static const struct of_device_id pv88080_dt_ids[] = { { .compatible = "pvs,pv88080", .data = &pv88080_aa_regs }, { .compatible = "pvs,pv88080-aa", .data = &pv88080_aa_regs }, @@ -521,7 +521,6 @@ static const struct of_device_id pv88080_dt_ids[] = { {} }; MODULE_DEVICE_TABLE(of, pv88080_dt_ids); -#endif static const struct i2c_device_id pv88080_i2c_id[] = { { "pv88080", (kernel_ulong_t)&pv88080_aa_regs }, @@ -535,7 +534,7 @@ static struct i2c_driver pv88080_regulator_driver = { .driver = { .name = "pv88080", .probe_type = PROBE_PREFER_ASYNCHRONOUS, - .of_match_table = of_match_ptr(pv88080_dt_ids), + .of_match_table = pv88080_dt_ids, }, .probe = pv88080_i2c_probe, .id_table = pv88080_i2c_id,