Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1685750rdb; Thu, 7 Dec 2023 06:19:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IGIUJ2S2rhYi76gMkr9isLGR9UooY5PUraFDx38tAVMeiL3tB4PPtrIN0X5QmUxpNiIPQIG X-Received: by 2002:a17:903:41cb:b0:1d0:6ffd:ceb7 with SMTP id u11-20020a17090341cb00b001d06ffdceb7mr2567680ple.112.1701958753030; Thu, 07 Dec 2023 06:19:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701958753; cv=none; d=google.com; s=arc-20160816; b=0XX8HxooRuAiSpbQhILYyCJTxh3wO7B7mnsQMZ7/b8gTSyQTYRKTIsl8Q/4BzBByYf KNWuy7wRc15G9m/ghO3bGYWaaNsb9jibITaMfNbV3P7mxf0oC2YCYEUwPHeh64FOfiVB t4pTDjqps6Wa3HPi83YTpNPgXsFt6jEcyyyLK3OWVWYy4JLfDzMruxptdQVh3HOnIkqg RBmAu/yXO78uegxJGmpNSplDwUku6OH2yJqMi5OqnWFNLEJb5t38hCJgCuh5CUCcfv3t /ob0shzVJYdrjtCtYIcXeFSLJO4sDM2LABaH9KFP4kfTYRIskvNIu0ga3jsJQ6iNe9QG Bsgg== 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 :dkim-signature; bh=ru6exqlky3XS1KO2N2CkOguQ/7xLMVzoUJOEqGdLmQ4=; fh=2EyuYZuFv7pvbWODgXyYvSVo1Jt/nOD9U4n59BuOM5Q=; b=umYdTxTF64/TiaicnaoQE0jorefdgcxo3xWgsWSn9bNSHNhMeldDnZZkY6d1SkmUYB 9umPPBcrDWAcbVpybtznHahu8cqIirW0WRmWUtg/9ylZOVXvYd2rwo/zGFNwY8i70i0w nZfN7lAN1xANrpic7cOqP+FImVccqWiszmyuOZq2EEWFUKgL+mzpaobqWOnEMpcvcd5x OHzgixlPiY+CrfB4fNDiAYT5N6NdNol/ti4z2XM/0naxrUmNxUvA1LIsZur5gpiIjwzX PLaEP5RkIFpFmlL6z/KNbzp8rfd/tlqm0UiAzU197UpLDM0IJK/9Me3pN94UH9P5Xjtp dilQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="V/aSUf+A"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id n3-20020a170903110300b001d09c96ba1esi1235328plh.452.2023.12.07.06.19.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 06:19:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="V/aSUf+A"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id C8FFA828FAD0; Thu, 7 Dec 2023 06:18:55 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443244AbjLGORZ (ORCPT + 99 others); Thu, 7 Dec 2023 09:17:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443174AbjLGORG (ORCPT ); Thu, 7 Dec 2023 09:17:06 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9920A10DC; Thu, 7 Dec 2023 06:17:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701958631; x=1733494631; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=AeyrvLyVIbJMMr8GvR6wVfdfP/hfJvA+/Lw69Ew1POU=; b=V/aSUf+AmuslQw9/hehzHn50aSU0eCsgXwMaI3+Tu2yjDBm7g1Y8GFTO nSbUoRSxf5LPfNzLrqWxwhyyjxPHSr+AQuLNiRjsMXwfc8Pn1u19j/+D9 P+WL99PVBYB74y5AVI21IWqXl4QS7QVF3RHpzBSgDSGzd7duO2aojGVM3 SEvNFvixrx3XDMFY0v651K1BgZOmGcaIGPm0FqLiBq51jQVWcJe4OCJyB UTjbm72C33cVNYfWUOsN2CpIA5k+psCa5vpQroX28SEwAzL9kxCqitirt ysmqVFqS02VKACh+ZF1qZeSKARCyf/vJ3XOnas+zT9XAqT3jVqFtDKfZD w==; X-IronPort-AV: E=McAfee;i="6600,9927,10917"; a="460726103" X-IronPort-AV: E=Sophos;i="6.04,256,1695711600"; d="scan'208";a="460726103" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Dec 2023 06:17:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10917"; a="889756077" X-IronPort-AV: E=Sophos;i="6.04,256,1695711600"; d="scan'208";a="889756077" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 07 Dec 2023 06:17:07 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id D9391892; Thu, 7 Dec 2023 16:17:02 +0200 (EET) From: Andy Shevchenko To: Mario Limonciello , Jarkko Nikula , Herbert Xu , Andy Shevchenko , Wolfram Sang , Andi Shyti , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mika Westerberg , Jan Dabros , Philipp Zabel , Serge Semin Subject: [PATCH v5 08/24] i2c: designware: Replace MODULE_ALIAS() with MODULE_DEVICE_TABLE() Date: Thu, 7 Dec 2023 16:13:48 +0200 Message-ID: <20231207141653.2785124-9-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20231207141653.2785124-1-andriy.shevchenko@linux.intel.com> References: <20231207141653.2785124-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 07 Dec 2023 06:18:56 -0800 (PST) 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 ed2f9e7ba5d3..35eba432bd08 100644 --- a/drivers/i2c/busses/i2c-designware-pcidrv.c +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c @@ -416,8 +416,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 4b5e58e1ce5b..5d8427ccc9b4 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -486,8 +486,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, @@ -498,6 +501,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.43.0.rc1.1.gbec44491f096