Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp1403152lqd; Thu, 25 Apr 2024 14:45:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUnhvTEjRZFETR5a0UDxzkXIeTrAMKNxPJ94rlIz+0w8GF9ntrowxO1PLInhV3zARvp5zHZY/6JDYaHt/JroqVp/MMqZsOiv5EFOjyobA== X-Google-Smtp-Source: AGHT+IGVKOctzKhBWPfsBB8Ky9jE5tnEyk655ssZfBub50FXcEeGafLHHE9Rjhqxroa+K1LabeDR X-Received: by 2002:a05:6870:2148:b0:22e:a036:c33a with SMTP id g8-20020a056870214800b0022ea036c33amr739792oae.6.1714081549627; Thu, 25 Apr 2024 14:45:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714081549; cv=pass; d=google.com; s=arc-20160816; b=HvLgNNHNxMS5gQZnUVCSCMKYvmR1n5WswS1t6toju228+EcEFlAEkMgPgSrfe3/Gry IlfR+Fv2oM2XhiWq0PjRR/eMcKYmEVgDmDA1Vc6Wj/kpPbXAtIIqZCRCULVqb96Ug3of RI5uu+KyBl+KeC2sxZHcG/nGUPVrRxN870hSGYBNOywXLK/6VLye+NmwKOhdmA5n2cFp LxOoPIw6kGBojPslqxAqj2w+2lJX+odeBl8IF3Y79dpPPnufl8qwV0tWQbB7CYpEPiLa dlWZoaHcfwnlcH6MG0dQElgD4b5+dwdtTmhZ0d9BmQiKF4+D60hDQMTjxmjdmuKym9tx xcOQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:dkim-filter; bh=5i3wXIhlhWPBHOSjEm7haV4D77zt98VBlR0Q2sdbIgk=; fh=92NyC13GaIST4z/2zQy1Dc17VLhJECvYXkOmnnBRHo4=; b=gkZeiu3txfaj/Xuphv//XJpVPmPXUTe37Vx0G1hM31TSqRGKaRRCVO+/OWF0w3Ui6Z BcwMwGR7u/L4dHO/NIcYbRD1lUhMzgGhU77bsuX+Pq9p16Xn1xUbI8aHGMzVi+pjxxBD N6z5F+wC5vDw4Epu5ioMAHV1JyTNPuEJHyyj1YlZJRoFhZ9+G4JJAZuJRz6b7ddiZ4KL USNMtQ972DUk5s3bHYefYkDoFVkktxo/K09YWivQ30KyVw0gVdzT/WcQ1n44XITvUF1Y vTHjXWFW4dsKv3e3EH42Vl4skyTQ7bA5WlgV+QMr1poHLp7W7wh0Q/hAZlbHf53mO48C PDcA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@broadcom.com header.s=dkimrelay header.b=u0NAEyL8; arc=pass (i=1 dkim=pass dkdomain=broadcom.com dmarc=pass fromdomain=broadcom.com); spf=pass (google.com: domain of linux-kernel+bounces-159236-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159236-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id p6-20020a63fe06000000b005dc7fe155aesi13399629pgh.443.2024.04.25.14.45.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 14:45:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-159236-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=dkimrelay header.b=u0NAEyL8; arc=pass (i=1 dkim=pass dkdomain=broadcom.com dmarc=pass fromdomain=broadcom.com); spf=pass (google.com: domain of linux-kernel+bounces-159236-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159236-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id E6C6E286764 for ; Thu, 25 Apr 2024 21:45:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1F2DA156F41; Thu, 25 Apr 2024 21:44:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="u0NAEyL8" Received: from relay.smtp-ext.broadcom.com (relay.smtp-ext.broadcom.com [192.19.144.205]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4BBA7153834; Thu, 25 Apr 2024 21:44:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.19.144.205 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714081486; cv=none; b=ARPWe3qa7XAG8RhQn2jTSctPcnCctQHyt142PbKilFaYzcHq8I91vvN+ZrkPFFv4GtNp7B46Kv3/xXhVgW6rFrNRZDrreehHn9+OnxhxnTGIiF4LhR+uQMF10PkeV/rcprWZUWlWetMmNA64xQngd9rGjlI5fO5OaWhJIYEGZ3A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714081486; c=relaxed/simple; bh=XWtzJrSwSicDwJ6itlPAo63YEYNCPCp+5FvVdfwfwc8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qR9qnzH1eMXy13BROlpZy3+dB0oChr01WnM67A47iaUURucJwnOdf5HyFq8XNzKWaw8oZIpiEEXWFstXnYBinAbr/+57/3KnR8VxLb6RScrNy9poXYM4XTQZGThylBJ+8spXfTzCjtAjDNxM5oeOHfYyJdakUrtGkq9HQ8NOBhc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=u0NAEyL8; arc=none smtp.client-ip=192.19.144.205 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Received: from mail-lvn-it-01.lvn.broadcom.net (mail-lvn-it-01.lvn.broadcom.net [10.36.132.253]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id 1984FC002825; Thu, 25 Apr 2024 14:44:42 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 1984FC002825 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1714081482; bh=XWtzJrSwSicDwJ6itlPAo63YEYNCPCp+5FvVdfwfwc8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=u0NAEyL8pRwRLU25wUUIBJiXuxfN6Z27cFNnJiypMuatqHijrxLYyy2Vr18QNCHnQ Mi/luXIxXVlsbx2M4QsAHvrMusqMboLsCztYbPlODNZDn930lB/SnlO+Zr90LVg7Ih mq+BUrR8b73DZ28tFHKJQ32GcACt4S/9AbnoU9g4= Received: from fainelli-desktop.igp.broadcom.net (fainelli-desktop.dhcp.broadcom.net [10.67.48.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail-lvn-it-01.lvn.broadcom.net (Postfix) with ESMTPSA id 183C718041CAC6; Thu, 25 Apr 2024 14:44:40 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Andy Shevchenko , Andi Shyti , Mario Limonciello , Jarkko Nikula , Serge Semin , Mika Westerberg , Jan Dabros , Lee Jones , Jiawen Wu , Mengyuan Lou , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maciej Fijalkowski , Andrew Lunn , Duanqiang Wen , linux-i2c@vger.kernel.org (open list:SYNOPSYS DESIGNWARE I2C DRIVER), netdev@vger.kernel.org (open list:WANGXUN ETHERNET DRIVER) Subject: [PATCH v3 1/5] i2c: designware: Replace MODULE_ALIAS() with MODULE_DEVICE_TABLE() Date: Thu, 25 Apr 2024 14:44:34 -0700 Message-Id: <20240425214438.2100534-2-florian.fainelli@broadcom.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240425214438.2100534-1-florian.fainelli@broadcom.com> References: <20240425214438.2100534-1-florian.fainelli@broadcom.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Andy Shevchenko As Krzysztof Kozlowski pointed out the better is to use MODULE_DEVICE_TABLE() as it will be consistent with the content of the real ID table of the platform devices. While at it, drop unneeded and unused module alias in PCI glue driver as PCI already has its own ID table and automatic loading should just work. Reviewed-by: Andi Shyti Reviewed-by: Mario Limonciello Acked-by: Jarkko Nikula Tested-by: Jarkko Nikula Tested-by: Serge Semin Link: https://lore.kernel.org/r/20231120144641.1660574-9-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko --- drivers/i2c/busses/i2c-designware-pcidrv.c | 2 -- drivers/i2c/busses/i2c-designware-platdrv.c | 8 ++++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c index 9be9a2658e1f..a1b379a1e904 100644 --- a/drivers/i2c/busses/i2c-designware-pcidrv.c +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c @@ -424,8 +424,6 @@ static struct pci_driver dw_i2c_driver = { }; module_pci_driver(dw_i2c_driver); -/* Work with hotplug and coldplug */ -MODULE_ALIAS("i2c_designware-pci"); MODULE_AUTHOR("Baruch Siach "); MODULE_DESCRIPTION("Synopsys DesignWare PCI I2C bus adapter"); MODULE_LICENSE("GPL"); diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index 4ab41ba39d55..0be7b0dc849b 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -479,8 +479,11 @@ static const struct dev_pm_ops dw_i2c_dev_pm_ops = { RUNTIME_PM_OPS(dw_i2c_plat_runtime_suspend, dw_i2c_plat_runtime_resume, NULL) }; -/* Work with hotplug and coldplug */ -MODULE_ALIAS("platform:i2c_designware"); +static const struct platform_device_id dw_i2c_platform_ids[] = { + { "i2c_designware" }, + {} +}; +MODULE_DEVICE_TABLE(platform, dw_i2c_platform_ids); static struct platform_driver dw_i2c_driver = { .probe = dw_i2c_plat_probe, @@ -491,6 +494,7 @@ static struct platform_driver dw_i2c_driver = { .acpi_match_table = ACPI_PTR(dw_i2c_acpi_match), .pm = pm_ptr(&dw_i2c_dev_pm_ops), }, + .id_table = dw_i2c_platform_ids, }; static int __init dw_i2c_init_driver(void) -- 2.34.1