Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2269470rdb; Mon, 20 Nov 2023 06:48:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IHUBwmSrsE3QQzVJVYCZdhhRSofcOUZWbm9e+fRB3IzPLYHZONwOm6/CSRFGVK7ELp1JXUN X-Received: by 2002:a17:902:a5c5:b0:1cf:5760:43f9 with SMTP id t5-20020a170902a5c500b001cf576043f9mr3896197plq.64.1700491689267; Mon, 20 Nov 2023 06:48:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700491689; cv=none; d=google.com; s=arc-20160816; b=R9rt4dvodEzHQvRwj9qu0ePvq6bzkvvZFH8CLqeYdHt39FQCRgSkHLX/7HDn0UjFph M3rET9Ml/ftRV3OFVkvaWj1jDlgnCCMB/FUB28heeAKUjoW43ORnrGGq/j1WL4Z6P3fm dPPbtbAv+20BzZ9rI7c70JaWhbdmX9r7M2JbdCA1T6Nqoq4XgKTIk8jel9ANEOU6zfbS 4j7nDSiFmuOuZsqvUqrO0LXt3WoYmp6FStC5hqCeURss0OdwM3jLBl6k/3JcBLc2MJ+Q JXdNAiHfk8ZA9RWKiOyjUDuJqE7CiQ4fig7Nmd959uwLBFzBM9DSEf1U0jpsI6PvEOXK 05xA== 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=jMEz5GUEG7YeeUwJtObd5fKiO2swMnI8eCL6RDMbMXY=; fh=g3amdiifXhwL/mTWljo4oOX/iLvH3RCBC8SWsJqOWek=; b=lJSAgNah0i6DuE81A28rD5gPP1YhYF/PUElXGmzkirGjXDu+3NUqScFYJV+JkZMRbC 3xlT7PRCCggjQYPVsWHRjJf0L2SDp8hiOAv/MGon6DwnzPwcDXrTUACeE4UNHCLbDtsc 1N8r4Mt9SU8O4dlvy7FELt8lFV7LltxuaKFxObjgq+v+l30mtfAyi7NdEwmD8UD1F47I PN/GIZgIoRzg0DxS/O1OYEWDCfkbIhgSZsXkyKUR5iKZfqEMalX2sEznJYhse2JdCidM K1ZrlcW+Z9Ax0HWBcef0AbH7YhJ4+6P573KOeIof9TP9uWOnnYvU/JLxIYGpFWTJEpAC +0Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=oIz4xhHF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id y7-20020a17090322c700b001cf677bb7edsi788533plg.544.2023.11.20.06.48.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 06:48:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=oIz4xhHF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id C6B6B80494B6; Mon, 20 Nov 2023 06:47:58 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233855AbjKTOrY (ORCPT + 99 others); Mon, 20 Nov 2023 09:47:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233770AbjKTOrE (ORCPT ); Mon, 20 Nov 2023 09:47:04 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB4D3AC; Mon, 20 Nov 2023 06:46:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700491615; x=1732027615; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=a0HnivyqeJl6wC2ISiRgNK9FZh2F7hAFet2cYQUURw8=; b=oIz4xhHFjxVQTZ5z3HkL2IC7eUbPRsjomCkKLilEveTpJcbC4v2W+Efx Bfy46TzeLq+tcoUgSy1ld8OD3A0QUwCFKcGj3YhHOiYpadLzdRPphPKZ0 H4loEGUEzzILCmWEDHA9BenqjWFZygEbUHtmSwDjxHdPxJGhQhPgKJwJs 70mPZTLY47gWXO2BFzlFH2N4hI6G/vRvzKmfN99EtzJXMet/dzzljmA8N ZNrlw4CqH7lWuwwPgFs6SJn9FTl+EdgkFvCB0/Yq0NIcKu5NnqvxbJ8RK i6BhLakLxc0fVpupLsdMan5TjPFCofhhhWArMAGD3X1ZVZnnBwKczydKr w==; X-IronPort-AV: E=McAfee;i="6600,9927,10900"; a="382017031" X-IronPort-AV: E=Sophos;i="6.04,214,1695711600"; d="scan'208";a="382017031" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Nov 2023 06:46:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10900"; a="832291643" X-IronPort-AV: E=Sophos;i="6.04,214,1695711600"; d="scan'208";a="832291643" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga008.fm.intel.com with ESMTP; 20 Nov 2023 06:46:50 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 82E293B5; Mon, 20 Nov 2023 16:46:44 +0200 (EET) From: Andy Shevchenko To: Mario Limonciello , Jarkko Nikula , Herbert Xu , Andy Shevchenko , Wolfram Sang , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mika Westerberg , Jan Dabros , Andi Shyti , Philipp Zabel Subject: [PATCH v4 08/24] i2c: designware: Replace MODULE_ALIAS() with MODULE_DEVICE_TABLE() Date: Mon, 20 Nov 2023 16:41:50 +0200 Message-ID: <20231120144641.1660574-9-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20231120144641.1660574-1-andriy.shevchenko@linux.intel.com> References: <20231120144641.1660574-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 agentk.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 (agentk.vger.email [0.0.0.0]); Mon, 20 Nov 2023 06:47:59 -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 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