Received: by 2002:a05:7412:f584:b0:e2:908c:2ebd with SMTP id eh4csp795721rdb; Sun, 3 Sep 2023 10:45:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGtYSegWM98FfzUPDjDSvzAdNmVApVvYDi21jzq/gr8XRgmFGKdIJcguXJIUrZUmUybuJZK X-Received: by 2002:a54:4513:0:b0:3a9:ba39:6d4a with SMTP id l19-20020a544513000000b003a9ba396d4amr8379264oil.18.1693763103221; Sun, 03 Sep 2023 10:45:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693763103; cv=none; d=google.com; s=arc-20160816; b=yj291LwYytSNYbqnqKN9e4N5eERFA5c/CJCzmuTOY8RFjmm6jOSlmO456at/OKxYte 1lxXwcVwCh0nV9WaTuH2kq8GwPIF5oWgPOOh6ytrx+AfP0NBO9MBkZhJ8VUcnIb8bxcU KFQt81WMWNWu5MhJQVKzyk+ti5THFkjMXbgJvK5fGxodd6RYfaLnYEIq7zKsAJiCx3Cs uLjPRHPJCAgnjh9uTbMwsmV+8SGEJpZdehofkLF5kGKP84pDgEcwOKN9K9z1C3LHvhq8 7Vi9utlT36vxuqdGj0Uh1Ewsal1/bITqQjRtXswHQArrTennWwFgPb09nDvqb3BvJMwy kllw== 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=kbRU4GHyolPTSniUUY7gNxtia9+CUUTe1VqnjH6MCkg=; fh=NVjdMTJP2anJSruYgwClNWTLOkAYA5MmJyXXqUuhOzg=; b=aA9czlDFkeN7rNxxCpO2V00NhayI94oRte6AWpTbKD1UZT7AoUHhd1LOgu+Qpks/1Y itPaUYhVodQMVfIbIHMp5apGfZiPiZFtxBGjwjGuynMwRcnrkHngOkmtkeJl/775255N 4k7cUqcOplgReLZgFsfVktLdcTL/MUDnJDVERhpBilzdiBSLbRK7KYqY/2I5syQMnpUc Ati3YVLNPFdvZkRoc9PRKDGBESIyNVowr/T5wzouG/Y39dGj7brjTf6FAndKE+nm8UUh aKjIAYsYO7xqHJK4qpE5UYKtHqOLoArzYySlODKZBt6tAX9D+NAnnVCjWePWToA0okxG F/fA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fh24-20020a17090b035800b0025bdc2a0b15si8931917pjb.135.2023.09.03.10.44.40; Sun, 03 Sep 2023 10:45:03 -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 S1343500AbjICQsv (ORCPT + 99 others); Sun, 3 Sep 2023 12:48:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343527AbjICQsu (ORCPT ); Sun, 3 Sep 2023 12:48:50 -0400 Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5C4F210D for ; Sun, 3 Sep 2023 09:48:46 -0700 (PDT) X-IronPort-AV: E=Sophos;i="6.02,224,1688396400"; d="scan'208";a="174853015" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 04 Sep 2023 01:48:40 +0900 Received: from localhost.localdomain (unknown [10.226.92.30]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 08C714023AAB; Mon, 4 Sep 2023 01:48:37 +0900 (JST) From: Biju Das To: Liam Girdwood , Mark Brown Cc: Biju Das , linux-kernel@vger.kernel.org, Biju Das , Andy Shevchenko Subject: [PATCH v3 1/2] regulator: pv880x0: Drop ifdeffery Date: Sun, 3 Sep 2023 17:48:31 +0100 Message-Id: <20230903164832.83077-2-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230903164832.83077-1-biju.das.jz@bp.renesas.com> References: <20230903164832.83077-1-biju.das.jz@bp.renesas.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 Drop of_match_ptr() from pv88080_regulator_driver and get rid of ugly CONFIG_OF ifdeffery. This slightly increases the size of pv88080_dt_ids on non-OF system and shouldn't be an issue. Add mod_devicetable.h include. While at it, remove trailing comma in the terminator entry for OF/ID table. Suggested-by: Andy Shevchenko Signed-off-by: Biju Das --- v2->v3: * Swapped the patch. * Removed trailing comma in the terminator entry for OF/ID table. * Restored OF table position. * Updated commit description. v2: * New patch. --- drivers/regulator/pv88080-regulator.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/regulator/pv88080-regulator.c b/drivers/regulator/pv88080-regulator.c index 7ab3e4a9bd28..1b2a8385e2e8 100644 --- a/drivers/regulator/pv88080-regulator.c +++ b/drivers/regulator/pv88080-regulator.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -196,15 +197,13 @@ static const struct pv88080_compatible_regmap pv88080_ba_regs = { .hvbuck_vsel_mask = PV88080_VHVBUCK_MASK, }; -#ifdef CONFIG_OF static const struct of_device_id pv88080_dt_ids[] = { { .compatible = "pvs,pv88080", .data = (void *)TYPE_PV88080_AA }, { .compatible = "pvs,pv88080-aa", .data = (void *)TYPE_PV88080_AA }, { .compatible = "pvs,pv88080-ba", .data = (void *)TYPE_PV88080_BA }, - {}, + {} }; MODULE_DEVICE_TABLE(of, pv88080_dt_ids); -#endif static unsigned int pv88080_buck_get_mode(struct regulator_dev *rdev) { @@ -550,7 +549,7 @@ static const struct i2c_device_id pv88080_i2c_id[] = { { "pv88080", TYPE_PV88080_AA }, { "pv88080-aa", TYPE_PV88080_AA }, { "pv88080-ba", TYPE_PV88080_BA }, - {}, + {} }; MODULE_DEVICE_TABLE(i2c, pv88080_i2c_id); @@ -558,7 +557,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, -- 2.25.1