Message ID | 20230515175042.495377-1-afd@ti.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp7117981vqo; Mon, 15 May 2023 11:39:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ758NyTNqw9+IkGTHkCSL5HhS41pHNUDMqS+eH9vvMIQeR+HgNlIx9PGtewMor5jTlvR6Ox X-Received: by 2002:a17:902:7481:b0:1a9:7e26:d72 with SMTP id h1-20020a170902748100b001a97e260d72mr34605302pll.9.1684175941980; Mon, 15 May 2023 11:39:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684175941; cv=none; d=google.com; s=arc-20160816; b=YEmkNvjfzaGjxCB38rl7zQA1mSGJ2p6W+I8p597Lb/3zOh3rMML8jXyZbf3gEuJftT XnQKqh2zrkjNIUlTXcW6ErXgXS9kmau9TXxuuhgb38siuaKcW7jWYPZEpH7fAV5aT1p5 MyoEw/eYSE4kb2rmrYXugTD4RIW9KDn0qfh3cCGnDmh84EjQOPeY4NfQgqzPqLXN6+dn M4np2Hw1GSyPs8RlWuLAzyaIWkns4Zr3D6KQ69kuE71jfgsGZu07baDwEBCUSC+UEBV7 f7AgSd+23gR3Cxc8SYncYOYIteOQtX19Hh34yKm4iVp8wkDXmc0L0877IUr7QtOeD2Q2 PElQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=li1qACpEc+UiOMT6jAFyohJIo3GdjAxTe9n1fUN9AiE=; b=xNiNuZx731nMBV1JIuh7RGnwzH/X4MXxQaL5N+isCpiApc7FbVsY8jsoPn9/McZkJD gnduhViJphCRSZlGUoLs0MwHkDsh/DqE+Uq7poC+uHDQvvC5LDTdHchTPjUpuJUZC5QE wbcZ0rfMMeDTpzN90wiT2jLrwtXuTG/ROE5LZz2IieAC/NhYTurN1pGwmWrOQTihzGzb KXOcu+aAtmNkfyfspK1uKrZ/cVouCYzg/oqtRmYDLDfgOjwTh+DLhsi1qnc6ZeIj8RlJ 9cPOQ0/Km5XR12fog8wcdrm+D9Va8aZ0AcTwYZrD2sC2TZL3IXT/VdXfsYdwhabxBNms PdFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=v9tiwB0B; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 19-20020a170902c21300b001ab0bc1e621si16108536pll.12.2023.05.15.11.38.46; Mon, 15 May 2023 11:39:01 -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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=v9tiwB0B; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242173AbjEOSbN (ORCPT <rfc822;peekingduck44@gmail.com> + 99 others); Mon, 15 May 2023 14:31:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236831AbjEOSbL (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 15 May 2023 14:31:11 -0400 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB32C46B2; Mon, 15 May 2023 11:31:09 -0700 (PDT) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 34FHohqw026890; Mon, 15 May 2023 12:50:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1684173043; bh=li1qACpEc+UiOMT6jAFyohJIo3GdjAxTe9n1fUN9AiE=; h=From:To:CC:Subject:Date; b=v9tiwB0Bgx2QtIRTsyCWaYsPaFqE0g0Wv391XowCuAHuBR82X6X8KZCT6kGiRBT22 zsxwMFlR5HcgwgfybS1JDh3GcC2O4sbifqYg4W8hdBrsyJ+V2BFSXsbKhuY5Ys1iJ1 7yZ3iupwfdZOh1DzZOMsiTrAH8t4Q6G1xy0PLDFk= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 34FHohA0049310 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 15 May 2023 12:50:43 -0500 Received: from DFLE115.ent.ti.com (10.64.6.36) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Mon, 15 May 2023 12:50:43 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Mon, 15 May 2023 12:50:43 -0500 Received: from lelv0327.itg.ti.com (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 34FHohNp060959; Mon, 15 May 2023 12:50:43 -0500 From: Andrew Davis <afd@ti.com> To: Wolfram Sang <wsa@kernel.org>, Bartosz Golaszewski <brgl@bgdev.pl> CC: <linux-arm-kernel@lists.infradead.org>, <linux-i2c@vger.kernel.org>, <linux-kernel@vger.kernel.org>, Andrew Davis <afd@ti.com> Subject: [PATCH v2 1/2] i2c: davinci: Use platform table macro over module_alias Date: Mon, 15 May 2023 12:50:41 -0500 Message-ID: <20230515175042.495377-1-afd@ti.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765986472619330851?= X-GMAIL-MSGID: =?utf-8?q?1765986472619330851?= |
Series |
[v2,1/2] i2c: davinci: Use platform table macro over module_alias
|
|
Commit Message
Andrew Davis
May 15, 2023, 5:50 p.m. UTC
Generates the same platform module alias. More standard usage.
Signed-off-by: Andrew Davis <afd@ti.com>
---
drivers/i2c/busses/i2c-davinci.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
Comments
On Mon, May 15, 2023 at 7:50 PM Andrew Davis <afd@ti.com> wrote: > > Generates the same platform module alias. More standard usage. > > Signed-off-by: Andrew Davis <afd@ti.com> > --- > drivers/i2c/busses/i2c-davinci.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c > index 9750310f2c96..c55bd937def7 100644 > --- a/drivers/i2c/busses/i2c-davinci.c > +++ b/drivers/i2c/busses/i2c-davinci.c > @@ -940,12 +940,16 @@ static const struct dev_pm_ops davinci_i2c_pm = { > #define davinci_i2c_pm_ops NULL > #endif > > -/* work with hotplug and coldplug */ > -MODULE_ALIAS("platform:i2c_davinci"); > +static const struct platform_device_id davinci_i2c_driver_ids[] = { > + { .name = "i2c_davinci", }, > + { /* sentinel */ } > +}; > +MODULE_DEVICE_TABLE(platform, davinci_i2c_driver_ids); > > static struct platform_driver davinci_i2c_driver = { > .probe = davinci_i2c_probe, > .remove = davinci_i2c_remove, > + .id_table = davinci_i2c_driver_ids, > .driver = { > .name = "i2c_davinci", > .pm = davinci_i2c_pm_ops, > -- > 2.39.2 > Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Hi Andrew, On Mon, May 15, 2023 at 12:50:41PM -0500, Andrew Davis wrote: > Generates the same platform module alias. More standard usage. > > Signed-off-by: Andrew Davis <afd@ti.com> Could you kindly rebase this to my i2c/for-mergewindow branch? It seems it conflicts with the "callback returning void" conversion. Thanks, Wolfram
On Wed, Jun 07, 2023 at 11:32:38AM +0200, Wolfram Sang wrote: > Hi Andrew, > > On Mon, May 15, 2023 at 12:50:41PM -0500, Andrew Davis wrote: > > Generates the same platform module alias. More standard usage. > > > > Signed-off-by: Andrew Davis <afd@ti.com> > > Could you kindly rebase this to my i2c/for-mergewindow branch? It seems > it conflicts with the "callback returning void" conversion. I did this now and applied to for-next, thanks!
diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c index 9750310f2c96..c55bd937def7 100644 --- a/drivers/i2c/busses/i2c-davinci.c +++ b/drivers/i2c/busses/i2c-davinci.c @@ -940,12 +940,16 @@ static const struct dev_pm_ops davinci_i2c_pm = { #define davinci_i2c_pm_ops NULL #endif -/* work with hotplug and coldplug */ -MODULE_ALIAS("platform:i2c_davinci"); +static const struct platform_device_id davinci_i2c_driver_ids[] = { + { .name = "i2c_davinci", }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(platform, davinci_i2c_driver_ids); static struct platform_driver davinci_i2c_driver = { .probe = davinci_i2c_probe, .remove = davinci_i2c_remove, + .id_table = davinci_i2c_driver_ids, .driver = { .name = "i2c_davinci", .pm = davinci_i2c_pm_ops,