From nobody Wed Jun 17 04:20:19 2026 Received: from jpms-ob01-os7.noc.sony.co.jp (jpms-ob01-os7.noc.sony.co.jp [211.125.139.71]) (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 F243D3C73D9; Wed, 22 Apr 2026 09:49:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.125.139.71 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776851366; cv=none; b=KOlA0lmfGud3KM1V06uk3A1CCWgGjeikp8dkvnNDRs83URNQIFg2ciXTCA6QcxLSBK4zoEXSFAYy/MLi+NSYFWJmZjpkTj4vMn6JpPpFx1OFvdfNeJqvIB8DKUJjtebbRcu9w7Tbhlow5LUUPZk5GJ0UvJlUGl91FJPYbr90Cec= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776851366; c=relaxed/simple; bh=Ep6QIT5ucgr5upYbumWW0j4HwLVdmH1vYS1Pt6Gv6zc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=S/tfWArZ+/RwyvB5UCYvbHonSF/DgWkVJ4mSecHi1un0ZzTQZS4vWo8o3+NVoanBN97kE3BxAH7D2m1ogfkjsGFmWzedRIM6gf8Plm9TybQ4c02JEXJKnQJexl6ZEClyuXELXDdZ5WmWND0LQsAwISQmOIo2pvZuGBE9TPLtXsA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sony.com; spf=fail smtp.mailfrom=sony.com; dkim=pass (2048-bit key) header.d=sony.com header.i=@sony.com header.b=pC3qnr7Z; arc=none smtp.client-ip=211.125.139.71 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sony.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=sony.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sony.com header.i=@sony.com header.b="pC3qnr7Z" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sony.com; s=s1jp; t=1776851364; x=1808387364; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=EOPrpwN477o2q/ReoM7iwVtzVbTQQD8orRUi6dSpuPw=; b=pC3qnr7ZS/LZoswbPDV10v61l3RfXWkG+TcrjReZ9OuZD69CgUAxl2Yj baMXbpEsY/KENKj8v0UG0FRKkJPhtUXBsi0ovnJDN42Q13L3SpqywnKbn mcr5lOc9R4ka96pixmkIshDWryQ/MHSA+EwLDHK9lfCdERXW1Xip1tfMe ZYQPHi1EpqkogwmfNMBTM7mgTGFdfA/8b1cNlCGQFlHSKchVCUp+IxuEg HowvdLmqShTZ/PiZ5MAw2MBRejhKG0sdhcDD7u0W8mU8b94PV63RCo1fM WdHvEkYCEFvnxdeiKMYXeMqjfgoqL5DasGvmzW04uH4Jg22jHp+LuCgTc A==; X-CSE-ConnectionGUID: 2eIjFRZgTKmcJ38Lq2covQ== X-CSE-MsgGUID: rdewHf6ZRWOGRKxqn5RX3g== Received: from unknown (HELO jpmta-ob02-os7.noc.sony.co.jp) ([IPv6:2001:cf8:acf:1104::7]) by jpms-ob01-os7.noc.sony.co.jp with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2026 18:49:16 +0900 X-CSE-ConnectionGUID: HDWeGh87TYGngXRoL929NA== X-CSE-MsgGUID: 7gFORB46Sde4hwtBsaBa1A== X-IronPort-AV: E=Sophos;i="6.23,192,1770562800"; d="scan'208";a="51446128" Received: from unknown (HELO [127.0.1.1]) ([IPv6:2001:cf8:1:573:0:dddd:eb3e:119e]) by jpmta-ob02-os7.noc.sony.co.jp with ESMTP; 22 Apr 2026 18:49:14 +0900 From: Shashank Balaji Date: Wed, 22 Apr 2026 18:49:03 +0900 Subject: [PATCH v3 1/4] kernel: param: initialize module_kset on-demand Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260422-acpi_mod_name-v3-1-a184eff9ff6f@sony.com> References: <20260422-acpi_mod_name-v3-0-a184eff9ff6f@sony.com> In-Reply-To: <20260422-acpi_mod_name-v3-0-a184eff9ff6f@sony.com> To: Suzuki K Poulose , Mike Leach , James Clark , Alexander Shishkin , Maxime Coquelin , Alexandre Torgue , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Miguel Ojeda , Boqun Feng , Gary Guo , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Richard Cochran , Jonathan Corbet , Shuah Khan Cc: Rahul Bukte , Shashank Balaji , linux-kernel@vger.kernel.org, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, driver-core@lists.linux.dev, rust-for-linux@vger.kernel.org, linux-doc@vger.kernel.org, Daniel Palmer , Tim Bird X-Mailer: b4 0.16-dev-3bfbc X-Developer-Signature: v=1; a=openpgp-sha256; l=3602; i=shashank.mahadasyam@sony.com; h=from:subject:message-id; bh=Ep6QIT5ucgr5upYbumWW0j4HwLVdmH1vYS1Pt6Gv6zc=; b=owGbwMvMwCU2bX1+URVTXyjjabUkhswXM6dzfuk0KHdssl6afcBb7vreN/8eWjKq1OsHBuz/r rf2/omFHaUsDGJcDLJiiiylStW/9q4IWtJz5rUizBxWJpAhDFycAjCRBQWMDL1xyXY+2Ub9fQZd qjp73WJ6dO5Wyz+NUj7787vW13nSSxj+R5nGGMYFd6mwrNkTv25dfXkZm8McGYkGdv53KcxLLL9 yAAA= X-Developer-Key: i=shashank.mahadasyam@sony.com; a=openpgp; fpr=75227BFABDA852A48CCCEB2196AF6F727A028E55 module_kset is initialized in param_sysfs_init(), a subsys_initcall. A numb= er of platform drivers register themselves prior to subsys_initcalls. With an upcoming patch ("driver core: platform: set mod_name in driver registration= ") that sets their mod_name in struct device_driver, lookup_or_create_module() will be called for those drivers, which calls kset_find_object(module_kset,= mod_name). This fails because module_kset isn't alive yet. Fix this by initializing module_kset on-demand in lookup_or_create_module(). Retain the param_sysfs_init() subsys_initcall to ensure that module_kset is live after subsys_initcalls (assuming no OOM) for any users who may need it, on the off chance that it wasn't init'd on-demand because of no pre-subsys_initcall drivers. This on-demand path can trigger before subsys_initcall. kset_create_and_add= () be should safe in those contexts because the allocator is up and running by= then, no userspace to start uevent helper or listen to a uevent socket. Suggested-by: Greg Kroah-Hartman Co-developed-by: Rahul Bukte Signed-off-by: Rahul Bukte Signed-off-by: Shashank Balaji --- Patch 3 depends on this patch. --- kernel/params.c | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/kernel/params.c b/kernel/params.c index 74d620bc2521..f25d6fda159c 100644 --- a/kernel/params.c +++ b/kernel/params.c @@ -745,6 +745,26 @@ void module_param_sysfs_remove(struct module *mod) } #endif =20 +static int uevent_filter(const struct kobject *kobj) +{ + const struct kobj_type *ktype =3D get_ktype(kobj); + + if (ktype =3D=3D &module_ktype) + return 1; + return 0; +} + +static const struct kset_uevent_ops module_uevent_ops =3D { + .filter =3D uevent_filter, +}; + +static struct kset *__init_or_module ensure_module_kset(void) +{ + if (!module_kset) + module_kset =3D kset_create_and_add("module", &module_uevent_ops, NULL); + return module_kset; +} + struct module_kobject * __init_or_module lookup_or_create_module_kobject(const char *name) { @@ -752,6 +772,9 @@ lookup_or_create_module_kobject(const char *name) struct kobject *kobj; int err; =20 + if (!ensure_module_kset()) + return NULL; + kobj =3D kset_find_obj(module_kset, name); if (kobj) return to_module_kobject(kobj); @@ -911,19 +934,6 @@ static const struct sysfs_ops module_sysfs_ops =3D { .store =3D module_attr_store, }; =20 -static int uevent_filter(const struct kobject *kobj) -{ - const struct kobj_type *ktype =3D get_ktype(kobj); - - if (ktype =3D=3D &module_ktype) - return 1; - return 0; -} - -static const struct kset_uevent_ops module_uevent_ops =3D { - .filter =3D uevent_filter, -}; - struct kset *module_kset; =20 static void module_kobj_release(struct kobject *kobj) @@ -940,7 +950,7 @@ const struct kobj_type module_ktype =3D { }; =20 /* - * param_sysfs_init - create "module" kset + * param_sysfs_init - create module_kset if not already done * * This must be done before the initramfs is unpacked and * request_module() thus becomes possible, because otherwise the @@ -948,8 +958,7 @@ const struct kobj_type module_ktype =3D { */ static int __init param_sysfs_init(void) { - module_kset =3D kset_create_and_add("module", &module_uevent_ops, NULL); - if (!module_kset) { + if (!ensure_module_kset()) { printk(KERN_WARNING "%s (%d): error creating kset\n", __FILE__, __LINE__); return -ENOMEM; --=20 2.43.0 From nobody Wed Jun 17 04:20:19 2026 Received: from jpms-ob01-os7.noc.sony.co.jp (jpms-ob01-os7.noc.sony.co.jp [211.125.139.71]) (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 3A8323CA493; Wed, 22 Apr 2026 09:49:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.125.139.71 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776851367; cv=none; b=l5B9hIHRwU+K1+CFNUG97VfNTrAsrZ0M9qvDl6uKvBpuQmdDenz6Hp7XVnvQxsv1wwM3+OiqiMoIOVmnipvKvGVuUSQ33c3GFhrTNUneuCI3SxawHCHRCf7dIIsfN2jJui/GeVGJ74rlFrv0m6XxtcDo71q7SN6A5Qrd0YTKPQI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776851367; c=relaxed/simple; bh=eZjJersyGIBenk2J4qjxDILAN6mXfwSsXarE9vCQGA4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=nGkjQl9bkKGGSZPCcca2iuHDHQoYZpo7P/ywkj+6Uo+WvLfDjdUeA54C5BrE7iMwYQfxwSChDCW0S/q2V4nExoUhKq9XCWcW2jgaXFXd+dTHKzuicI13ZP1020AExfop4qlZFk5KRy+2P2enLISi8gy83VomPrQxqQucXuWE+zo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sony.com; spf=fail smtp.mailfrom=sony.com; dkim=pass (2048-bit key) header.d=sony.com header.i=@sony.com header.b=jAv3DWZZ; arc=none smtp.client-ip=211.125.139.71 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sony.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=sony.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sony.com header.i=@sony.com header.b="jAv3DWZZ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sony.com; s=s1jp; t=1776851366; x=1808387366; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=JBge5+9i7mMTwM3YkJGYLaTiwktQRowqhIWANLQ9LBw=; b=jAv3DWZZteab9wmdpQefrSUq84nJAZlg32XQ7OrvVom6Vtbf+085+7Gu yCqlopzyi2OclcvHlpGM6u9xXyxZIIZfw5Plvsn5YA53DYYDwW52CWS0O UBq3JeYTHhSIGIKh9XOzQHySSLeuGv73wccZExbVHcKDe/jiW7Z1tkp8l jeeW0GXTmFkAh02XIE3edwCvlQqJvDF22Kb/8bmw+boF5Z02XqG2gWqEd 3+TZ/SGt1dN5AjjCG5+hdzrJEZVNkIT11Eut6o+BeTEm0zAmjRfbRwhnG A+m0PZHEdVec0v8m+53h6wn5qXr5xqfUhZ3mSD9v4EPOrsegnqsKKVUQD w==; X-CSE-ConnectionGUID: QDGiE3e8RLSJcCKBGwwjgw== X-CSE-MsgGUID: ywc3+XvXRKClSMikwQ/6Jw== Received: from unknown (HELO jpmta-ob02-os7.noc.sony.co.jp) ([IPv6:2001:cf8:acf:1104::7]) by jpms-ob01-os7.noc.sony.co.jp with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2026 18:49:17 +0900 X-CSE-ConnectionGUID: QXYUqtlKSVm1g+ZPXX4t2Q== X-CSE-MsgGUID: M5YBq1fETDWRx9/xs4958A== X-IronPort-AV: E=Sophos;i="6.23,192,1770562800"; d="scan'208";a="51446131" Received: from unknown (HELO [127.0.1.1]) ([IPv6:2001:cf8:1:573:0:dddd:eb3e:119e]) by jpmta-ob02-os7.noc.sony.co.jp with ESMTP; 22 Apr 2026 18:49:16 +0900 From: Shashank Balaji Date: Wed, 22 Apr 2026 18:49:04 +0900 Subject: [PATCH v3 2/4] coresight: pass THIS_MODULE implicitly through a macro Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260422-acpi_mod_name-v3-2-a184eff9ff6f@sony.com> References: <20260422-acpi_mod_name-v3-0-a184eff9ff6f@sony.com> In-Reply-To: <20260422-acpi_mod_name-v3-0-a184eff9ff6f@sony.com> To: Suzuki K Poulose , Mike Leach , James Clark , Alexander Shishkin , Maxime Coquelin , Alexandre Torgue , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Miguel Ojeda , Boqun Feng , Gary Guo , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Richard Cochran , Jonathan Corbet , Shuah Khan Cc: Rahul Bukte , Shashank Balaji , linux-kernel@vger.kernel.org, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, driver-core@lists.linux.dev, rust-for-linux@vger.kernel.org, linux-doc@vger.kernel.org, Daniel Palmer , Tim Bird X-Mailer: b4 0.16-dev-3bfbc X-Developer-Signature: v=1; a=openpgp-sha256; l=8285; i=shashank.mahadasyam@sony.com; h=from:subject:message-id; bh=eZjJersyGIBenk2J4qjxDILAN6mXfwSsXarE9vCQGA4=; b=owGbwMvMwCU2bX1+URVTXyjjabUkhswXM2es+tR62ehV49PC6c3r/uY+vq7ve7ZGbZFWg/HPD 78+vt2o2lHKwiDGxSArpshSqlT9a++KoCU9Z14rwsxhZQIZwsDFKQATqXrI8M98kqTOvFcbRRb1 zrw3+fnn+48enQq8L7zy7ioHj+DUq8zfGP5nR0z92WnZeyVgdeoctS+epvEX3eZMnv9wH/dqdjn ezwu4AQ== X-Developer-Key: i=shashank.mahadasyam@sony.com; a=openpgp; fpr=75227BFABDA852A48CCCEB2196AF6F727A028E55 Rename coresight_init_driver() to __coresight_init_driver() and replace it with a macro wrapper that passes THIS_MODULE implicitly. This is in line= with what other buses do. Suggested-by: Greg Kroah-Hartman Co-developed-by: Rahul Bukte Signed-off-by: Rahul Bukte Signed-off-by: Shashank Balaji --- Patch 3 depends on this patch. --- drivers/hwtracing/coresight/coresight-catu.c | 2 +- drivers/hwtracing/coresight/coresight-core.c | 4 ++-- drivers/hwtracing/coresight/coresight-cpu-debug.c | 3 +-- drivers/hwtracing/coresight/coresight-funnel.c | 3 +-- drivers/hwtracing/coresight/coresight-replicator.c | 3 +-- drivers/hwtracing/coresight/coresight-stm.c | 2 +- drivers/hwtracing/coresight/coresight-tmc-core.c | 2 +- drivers/hwtracing/coresight/coresight-tnoc.c | 2 +- drivers/hwtracing/coresight/coresight-tpdm.c | 3 +-- drivers/hwtracing/coresight/coresight-tpiu.c | 2 +- include/linux/coresight.h | 4 +++- 11 files changed, 14 insertions(+), 16 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-catu.c b/drivers/hwtraci= ng/coresight/coresight-catu.c index dfd035852b12..1bace64eca73 100644 --- a/drivers/hwtracing/coresight/coresight-catu.c +++ b/drivers/hwtracing/coresight/coresight-catu.c @@ -708,7 +708,7 @@ static int __init catu_init(void) { int ret; =20 - ret =3D coresight_init_driver("catu", &catu_driver, &catu_platform_driver= , THIS_MODULE); + ret =3D coresight_init_driver("catu", &catu_driver, &catu_platform_driver= ); tmc_etr_set_catu_ops(&etr_catu_buf_ops); return ret; } diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/hwtraci= ng/coresight/coresight-core.c index 80e26396ad0a..9e93b22cb056 100644 --- a/drivers/hwtracing/coresight/coresight-core.c +++ b/drivers/hwtracing/coresight/coresight-core.c @@ -1644,7 +1644,7 @@ static void __exit coresight_exit(void) module_init(coresight_init); module_exit(coresight_exit); =20 -int coresight_init_driver(const char *drv, struct amba_driver *amba_drv, +int __coresight_init_driver(const char *drv, struct amba_driver *amba_drv, struct platform_driver *pdev_drv, struct module *owner) { int ret; @@ -1663,7 +1663,7 @@ int coresight_init_driver(const char *drv, struct amb= a_driver *amba_drv, amba_driver_unregister(amba_drv); return ret; } -EXPORT_SYMBOL_GPL(coresight_init_driver); +EXPORT_SYMBOL_GPL(__coresight_init_driver); =20 void coresight_remove_driver(struct amba_driver *amba_drv, struct platform_driver *pdev_drv) diff --git a/drivers/hwtracing/coresight/coresight-cpu-debug.c b/drivers/hw= tracing/coresight/coresight-cpu-debug.c index 629614278e46..3a806c1d50ea 100644 --- a/drivers/hwtracing/coresight/coresight-cpu-debug.c +++ b/drivers/hwtracing/coresight/coresight-cpu-debug.c @@ -757,8 +757,7 @@ static struct platform_driver debug_platform_driver =3D= { =20 static int __init debug_init(void) { - return coresight_init_driver("debug", &debug_driver, &debug_platform_driv= er, - THIS_MODULE); + return coresight_init_driver("debug", &debug_driver, &debug_platform_driv= er); } =20 static void __exit debug_exit(void) diff --git a/drivers/hwtracing/coresight/coresight-funnel.c b/drivers/hwtra= cing/coresight/coresight-funnel.c index 3b248e54471a..b9929f0d13ec 100644 --- a/drivers/hwtracing/coresight/coresight-funnel.c +++ b/drivers/hwtracing/coresight/coresight-funnel.c @@ -414,8 +414,7 @@ static struct amba_driver dynamic_funnel_driver =3D { =20 static int __init funnel_init(void) { - return coresight_init_driver("funnel", &dynamic_funnel_driver, &funnel_dr= iver, - THIS_MODULE); + return coresight_init_driver("funnel", &dynamic_funnel_driver, &funnel_dr= iver); } =20 static void __exit funnel_exit(void) diff --git a/drivers/hwtracing/coresight/coresight-replicator.c b/drivers/h= wtracing/coresight/coresight-replicator.c index e6472658235d..02fbca334667 100644 --- a/drivers/hwtracing/coresight/coresight-replicator.c +++ b/drivers/hwtracing/coresight/coresight-replicator.c @@ -420,8 +420,7 @@ static struct amba_driver dynamic_replicator_driver =3D= { =20 static int __init replicator_init(void) { - return coresight_init_driver("replicator", &dynamic_replicator_driver, &r= eplicator_driver, - THIS_MODULE); + return coresight_init_driver("replicator", &dynamic_replicator_driver, &r= eplicator_driver); } =20 static void __exit replicator_exit(void) diff --git a/drivers/hwtracing/coresight/coresight-stm.c b/drivers/hwtracin= g/coresight/coresight-stm.c index e68529bf89c9..d4fceb52a5cd 100644 --- a/drivers/hwtracing/coresight/coresight-stm.c +++ b/drivers/hwtracing/coresight/coresight-stm.c @@ -1052,7 +1052,7 @@ static struct platform_driver stm_platform_driver =3D= { =20 static int __init stm_init(void) { - return coresight_init_driver("stm", &stm_driver, &stm_platform_driver, TH= IS_MODULE); + return coresight_init_driver("stm", &stm_driver, &stm_platform_driver); } =20 static void __exit stm_exit(void) diff --git a/drivers/hwtracing/coresight/coresight-tmc-core.c b/drivers/hwt= racing/coresight/coresight-tmc-core.c index 36599c431be6..0e0caa600270 100644 --- a/drivers/hwtracing/coresight/coresight-tmc-core.c +++ b/drivers/hwtracing/coresight/coresight-tmc-core.c @@ -1051,7 +1051,7 @@ static struct platform_driver tmc_platform_driver =3D= { =20 static int __init tmc_init(void) { - return coresight_init_driver("tmc", &tmc_driver, &tmc_platform_driver, TH= IS_MODULE); + return coresight_init_driver("tmc", &tmc_driver, &tmc_platform_driver); } =20 static void __exit tmc_exit(void) diff --git a/drivers/hwtracing/coresight/coresight-tnoc.c b/drivers/hwtraci= ng/coresight/coresight-tnoc.c index 1128612e70a7..e3f54d215414 100644 --- a/drivers/hwtracing/coresight/coresight-tnoc.c +++ b/drivers/hwtracing/coresight/coresight-tnoc.c @@ -346,7 +346,7 @@ static struct platform_driver itnoc_driver =3D { =20 static int __init tnoc_init(void) { - return coresight_init_driver("tnoc", &trace_noc_driver, &itnoc_driver, TH= IS_MODULE); + return coresight_init_driver("tnoc", &trace_noc_driver, &itnoc_driver); } =20 static void __exit tnoc_exit(void) diff --git a/drivers/hwtracing/coresight/coresight-tpdm.c b/drivers/hwtraci= ng/coresight/coresight-tpdm.c index 06e0a905a67d..ca2add2af581 100644 --- a/drivers/hwtracing/coresight/coresight-tpdm.c +++ b/drivers/hwtracing/coresight/coresight-tpdm.c @@ -1533,8 +1533,7 @@ static struct platform_driver static_tpdm_driver =3D { =20 static int __init tpdm_init(void) { - return coresight_init_driver("tpdm", &dynamic_tpdm_driver, &static_tpdm_d= river, - THIS_MODULE); + return coresight_init_driver("tpdm", &dynamic_tpdm_driver, &static_tpdm_d= river); } =20 static void __exit tpdm_exit(void) diff --git a/drivers/hwtracing/coresight/coresight-tpiu.c b/drivers/hwtraci= ng/coresight/coresight-tpiu.c index aaa44bc521c3..401da2958f7f 100644 --- a/drivers/hwtracing/coresight/coresight-tpiu.c +++ b/drivers/hwtracing/coresight/coresight-tpiu.c @@ -312,7 +312,7 @@ static struct platform_driver tpiu_platform_driver =3D { =20 static int __init tpiu_init(void) { - return coresight_init_driver("tpiu", &tpiu_driver, &tpiu_platform_driver,= THIS_MODULE); + return coresight_init_driver("tpiu", &tpiu_driver, &tpiu_platform_driver); } =20 static void __exit tpiu_exit(void) diff --git a/include/linux/coresight.h b/include/linux/coresight.h index 2b48be97fcd0..4f58bfc59080 100644 --- a/include/linux/coresight.h +++ b/include/linux/coresight.h @@ -697,7 +697,9 @@ coresight_find_output_type(struct coresight_platform_da= ta *pdata, enum coresight_dev_type type, union coresight_dev_subtype subtype); =20 -int coresight_init_driver(const char *drv, struct amba_driver *amba_drv, +#define coresight_init_driver(drv, amba_drv, pdev_drv) \ + __coresight_init_driver(drv, amba_drv, pdev_drv, THIS_MODULE) +int __coresight_init_driver(const char *drv, struct amba_driver *amba_drv, struct platform_driver *pdev_drv, struct module *owner); =20 void coresight_remove_driver(struct amba_driver *amba_drv, --=20 2.43.0 From nobody Wed Jun 17 04:20:19 2026 Received: from jpms-ob01-os7.noc.sony.co.jp (jpms-ob01-os7.noc.sony.co.jp [211.125.139.71]) (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 9DEAE33EAF9; Wed, 22 Apr 2026 09:49:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.125.139.71 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776851368; cv=none; b=G95xjVNnaLSbDILivxEBcmEBgXiEZ0tEP+eAE7Gj2k8l+OTMU+4xJTkh8qNbAc1d/ZJ60fVNmnKVOnPaPOnPCpbXtcWhihFcPATBY641SQvSNAiSeCXEmbQSIoPRim7Xj8G5okc/hzUxFQrBjwVwTX7/WVDOhmdwGq2PFeCxuYY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776851368; c=relaxed/simple; bh=B6q++mSn5JRFnfsuFzhjJYD81tALEbBXnDVL8mzSizw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=nRYQtw2QfeExAErs2UnV0L0N09Xr99Pgv6A8lOWVESuwhdIOLbLt0ZLfqa8uYbsy/S1AX4DzpZbYnDUbFIsNr5epa9FRax9fDOzJXJe2cQAi2yjyLV8NTVVIclIPLLpY4POFlPT32hASkNu+iFCmtXAVRofrhPpvFtaABo8TCUI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sony.com; spf=fail smtp.mailfrom=sony.com; dkim=pass (2048-bit key) header.d=sony.com header.i=@sony.com header.b=nDbMoeQR; arc=none smtp.client-ip=211.125.139.71 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sony.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=sony.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sony.com header.i=@sony.com header.b="nDbMoeQR" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sony.com; s=s1jp; t=1776851367; x=1808387367; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=nBBO0mRcqdSPWhBtPPX6nCzgt6YjZR2JfRp0jrfAJWs=; b=nDbMoeQRwc0ok9pJaT+QELdKUJ4/JlSs2NVxbAJzidIu5WyOZ4W4uS3c 8R6QiCFz3A8OggvJjXaRGEHIu5C/ubV9f8A5u07F7nQLb2TWOOtjTEJCr 41hF3sFZepihg7rOwBUq4k7pXgxS059l8BFEVxMjJmNOLQoBDoErqKGrZ d9pTvpWvO/+Zf09WJB+vBSv3R2AceWQ22jxKznc2ekJf+Fx4e8dbVMful /j/NfdhXdDDUI/I1H33gu3zxmF6DMF3afzO50alGww7K1TRBGNvjNF/H9 8O977SeLoGlM4e+THb4oPkFGqOtR7JIt0A9NKw1SBWDAgPD7xhjlILU+y A==; X-CSE-ConnectionGUID: z2R/mJ7PQD6NFkP2LizPkQ== X-CSE-MsgGUID: hPNxaClSSmqjllMdZWB1dw== Received: from unknown (HELO jpmta-ob02-os7.noc.sony.co.jp) ([IPv6:2001:cf8:acf:1104::7]) by jpms-ob01-os7.noc.sony.co.jp with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2026 18:49:18 +0900 X-CSE-ConnectionGUID: BatEHnjgTPuKMzooe57vjg== X-CSE-MsgGUID: GQ4OY4IqT6SmX09kFmUv5A== X-IronPort-AV: E=Sophos;i="6.23,192,1770562800"; d="scan'208";a="51446134" Received: from unknown (HELO [127.0.1.1]) ([IPv6:2001:cf8:1:573:0:dddd:eb3e:119e]) by jpmta-ob02-os7.noc.sony.co.jp with ESMTP; 22 Apr 2026 18:49:17 +0900 From: Shashank Balaji Date: Wed, 22 Apr 2026 18:49:05 +0900 Subject: [PATCH v3 3/4] driver core: platform: set mod_name in driver registration Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260422-acpi_mod_name-v3-3-a184eff9ff6f@sony.com> References: <20260422-acpi_mod_name-v3-0-a184eff9ff6f@sony.com> In-Reply-To: <20260422-acpi_mod_name-v3-0-a184eff9ff6f@sony.com> To: Suzuki K Poulose , Mike Leach , James Clark , Alexander Shishkin , Maxime Coquelin , Alexandre Torgue , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Miguel Ojeda , Boqun Feng , Gary Guo , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Richard Cochran , Jonathan Corbet , Shuah Khan Cc: Rahul Bukte , Shashank Balaji , linux-kernel@vger.kernel.org, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, driver-core@lists.linux.dev, rust-for-linux@vger.kernel.org, linux-doc@vger.kernel.org, Daniel Palmer , Tim Bird X-Mailer: b4 0.16-dev-3bfbc X-Developer-Signature: v=1; a=openpgp-sha256; l=10432; i=shashank.mahadasyam@sony.com; h=from:subject:message-id; bh=B6q++mSn5JRFnfsuFzhjJYD81tALEbBXnDVL8mzSizw=; b=owGbwMvMwCU2bX1+URVTXyjjabUkhswXM2cIuCtMnVRoYV/zlPPYv2vqbCHJ85SjuRNDGTw2v 5xV8eNkRykLgxgXg6yYIkupUvWvvSuClvScea0IM4eVCWQIAxenAEzET5rhf2D8RsHHYuHLmIBa jixkiJi1RKLc8NnkqD+u3/zU2QWqGf5paTNXnppvb/GtLnTi++C3JiofvIVYP9X0zPsiUzn37Xx 2AA== X-Developer-Key: i=shashank.mahadasyam@sony.com; a=openpgp; fpr=75227BFABDA852A48CCCEB2196AF6F727A028E55 Pass KBUILD_MODNAME through the driver registration macro so that the driver core can create the module symlink in sysfs for built-in drivers, and fixup all callers. The Rust platform adapter is updated to pass the module name through to the= new parameter. Tested on qemu with: - x86 defconfig + CONFIG_RUST - arm64 defconfig + CONFIG_RUST + CONFIG_CORESIGHT stuff Examples after this patch: /sys/bus/platform/drivers/... coresight-itnoc/module -> coresight_tnoc coresight-static-tpdm/module -> coresight_tpdm coresight-catu-platform/module -> coresight_catu serial8250/module -> 8250 acpi-ged/module -> acpi vmclock/module -> ptp_vmclock Co-developed-by: Rahul Bukte Signed-off-by: Rahul Bukte Signed-off-by: Shashank Balaji --- This patch depends on patches 1 and 2. --- drivers/base/platform.c | 21 ++++++++++++++------- drivers/hwtracing/coresight/coresight-core.c | 5 +++-- include/linux/coresight.h | 5 +++-- include/linux/platform_device.h | 17 +++++++++-------- rust/kernel/platform.rs | 4 +++- 5 files changed, 32 insertions(+), 20 deletions(-) diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 75b4698d0e58..2b0cc0889386 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -901,11 +901,14 @@ EXPORT_SYMBOL_GPL(platform_device_register_full); * __platform_driver_register - register a driver for platform-level devic= es * @drv: platform driver structure * @owner: owning module/driver + * @mod_name: module name string */ -int __platform_driver_register(struct platform_driver *drv, struct module = *owner) +int __platform_driver_register(struct platform_driver *drv, struct module = *owner, + const char *mod_name) { drv->driver.owner =3D owner; drv->driver.bus =3D &platform_bus_type; + drv->driver.mod_name =3D mod_name; =20 return driver_register(&drv->driver); } @@ -938,6 +941,7 @@ static int is_bound_to_driver(struct device *dev, void = *driver) * @drv: platform driver structure * @probe: the driver probe routine, probably from an __init section * @module: module which will be the owner of the driver + * @mod_name: module name string * * Use this instead of platform_driver_register() when you know the device * is not hotpluggable and has already been registered, and you want to @@ -955,7 +959,8 @@ static int is_bound_to_driver(struct device *dev, void = *driver) */ int __init_or_module __platform_driver_probe(struct platform_driver *drv, int (*probe)(struct platform_device *), - struct module *module) + struct module *module, + const char *mod_name) { int retval; =20 @@ -983,7 +988,7 @@ int __init_or_module __platform_driver_probe(struct pla= tform_driver *drv, =20 /* temporary section violation during probe() */ drv->probe =3D probe; - retval =3D __platform_driver_register(drv, module); + retval =3D __platform_driver_register(drv, module, mod_name); if (retval) return retval; =20 @@ -1011,6 +1016,7 @@ EXPORT_SYMBOL_GPL(__platform_driver_probe); * @data: platform specific data for this platform device * @size: size of platform specific data * @module: module which will be the owner of the driver + * @mod_name: module name string * * Use this in legacy-style modules that probe hardware directly and * register a single platform device and corresponding platform driver. @@ -1021,7 +1027,7 @@ struct platform_device * __init_or_module __platform_create_bundle(struct platform_driver *driver, int (*probe)(struct platform_device *), struct resource *res, unsigned int n_res, - const void *data, size_t size, struct module *module) + const void *data, size_t size, struct module *module, const char *mod_= name) { struct platform_device *pdev; int error; @@ -1044,7 +1050,7 @@ __platform_create_bundle(struct platform_driver *driv= er, if (error) goto err_pdev_put; =20 - error =3D __platform_driver_probe(driver, probe, module); + error =3D __platform_driver_probe(driver, probe, module, mod_name); if (error) goto err_pdev_del; =20 @@ -1064,6 +1070,7 @@ EXPORT_SYMBOL_GPL(__platform_create_bundle); * @drivers: an array of drivers to register * @count: the number of drivers to register * @owner: module owning the drivers + * @mod_name: module name string * * Registers platform drivers specified by an array. On failure to registe= r a * driver, all previously registered drivers will be unregistered. Callers= of @@ -1073,7 +1080,7 @@ EXPORT_SYMBOL_GPL(__platform_create_bundle); * Returns: 0 on success or a negative error code on failure. */ int __platform_register_drivers(struct platform_driver * const *drivers, - unsigned int count, struct module *owner) + unsigned int count, struct module *owner, const char *mod_name) { unsigned int i; int err; @@ -1081,7 +1088,7 @@ int __platform_register_drivers(struct platform_drive= r * const *drivers, for (i =3D 0; i < count; i++) { pr_debug("registering platform driver %ps\n", drivers[i]); =20 - err =3D __platform_driver_register(drivers[i], owner); + err =3D __platform_driver_register(drivers[i], owner, mod_name); if (err < 0) { pr_err("failed to register platform driver %ps: %d\n", drivers[i], err); diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/hwtraci= ng/coresight/coresight-core.c index 9e93b22cb056..a9ff0b3d8717 100644 --- a/drivers/hwtracing/coresight/coresight-core.c +++ b/drivers/hwtracing/coresight/coresight-core.c @@ -1645,7 +1645,8 @@ module_init(coresight_init); module_exit(coresight_exit); =20 int __coresight_init_driver(const char *drv, struct amba_driver *amba_drv, - struct platform_driver *pdev_drv, struct module *owner) + struct platform_driver *pdev_drv, struct module *owner, + const char *mod_name) { int ret; =20 @@ -1655,7 +1656,7 @@ int __coresight_init_driver(const char *drv, struct a= mba_driver *amba_drv, return ret; } =20 - ret =3D __platform_driver_register(pdev_drv, owner); + ret =3D __platform_driver_register(pdev_drv, owner, mod_name); if (!ret) return 0; =20 diff --git a/include/linux/coresight.h b/include/linux/coresight.h index 4f58bfc59080..bcc6c1754dba 100644 --- a/include/linux/coresight.h +++ b/include/linux/coresight.h @@ -698,9 +698,10 @@ coresight_find_output_type(struct coresight_platform_d= ata *pdata, union coresight_dev_subtype subtype); =20 #define coresight_init_driver(drv, amba_drv, pdev_drv) \ - __coresight_init_driver(drv, amba_drv, pdev_drv, THIS_MODULE) + __coresight_init_driver(drv, amba_drv, pdev_drv, THIS_MODULE, KBUILD_MODN= AME) int __coresight_init_driver(const char *drv, struct amba_driver *amba_drv, - struct platform_driver *pdev_drv, struct module *owner); + struct platform_driver *pdev_drv, struct module *owner, + const char *mod_name); =20 void coresight_remove_driver(struct amba_driver *amba_drv, struct platform_driver *pdev_drv); diff --git a/include/linux/platform_device.h b/include/linux/platform_devic= e.h index 975400a472e3..26e6a43358e2 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h @@ -293,18 +293,19 @@ struct platform_driver { * use a macro to avoid include chaining to get THIS_MODULE */ #define platform_driver_register(drv) \ - __platform_driver_register(drv, THIS_MODULE) + __platform_driver_register(drv, THIS_MODULE, KBUILD_MODNAME) extern int __platform_driver_register(struct platform_driver *, - struct module *); + struct module *, const char *mod_name); extern void platform_driver_unregister(struct platform_driver *); =20 /* non-hotpluggable platform devices may use this so that probe() and * its support may live in __init sections, conserving runtime memory. */ #define platform_driver_probe(drv, probe) \ - __platform_driver_probe(drv, probe, THIS_MODULE) + __platform_driver_probe(drv, probe, THIS_MODULE, KBUILD_MODNAME) extern int __platform_driver_probe(struct platform_driver *driver, - int (*probe)(struct platform_device *), struct module *module); + int (*probe)(struct platform_device *), struct module *module, + const char *mod_name); =20 static inline void *platform_get_drvdata(const struct platform_device *pde= v) { @@ -368,19 +369,19 @@ static int __init __platform_driver##_init(void) \ device_initcall(__platform_driver##_init); \ =20 #define platform_create_bundle(driver, probe, res, n_res, data, size) \ - __platform_create_bundle(driver, probe, res, n_res, data, size, THIS_MODU= LE) + __platform_create_bundle(driver, probe, res, n_res, data, size, THIS_MODU= LE, KBUILD_MODNAME) extern struct platform_device *__platform_create_bundle( struct platform_driver *driver, int (*probe)(struct platform_device *), struct resource *res, unsigned int n_res, - const void *data, size_t size, struct module *module); + const void *data, size_t size, struct module *module, const char *mod_nam= e); =20 int __platform_register_drivers(struct platform_driver * const *drivers, - unsigned int count, struct module *owner); + unsigned int count, struct module *owner, const char *mod_name); void platform_unregister_drivers(struct platform_driver * const *drivers, unsigned int count); =20 #define platform_register_drivers(drivers, count) \ - __platform_register_drivers(drivers, count, THIS_MODULE) + __platform_register_drivers(drivers, count, THIS_MODULE, KBUILD_MODNAME) =20 #ifdef CONFIG_SUSPEND extern int platform_pm_suspend(struct device *dev); diff --git a/rust/kernel/platform.rs b/rust/kernel/platform.rs index 8917d4ee499f..2d626eecc450 100644 --- a/rust/kernel/platform.rs +++ b/rust/kernel/platform.rs @@ -82,7 +82,9 @@ unsafe fn register( } =20 // SAFETY: `pdrv` is guaranteed to be a valid `DriverType`. - to_result(unsafe { bindings::__platform_driver_register(pdrv.get()= , module.0) }) + to_result(unsafe { + bindings::__platform_driver_register(pdrv.get(), module.0, nam= e.as_char_ptr()) + }) } =20 unsafe fn unregister(pdrv: &Opaque) { --=20 2.43.0 From nobody Wed Jun 17 04:20:19 2026 Received: from jpms-ob01-os7.noc.sony.co.jp (jpms-ob01-os7.noc.sony.co.jp [211.125.139.71]) (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 9E6373BF689; Wed, 22 Apr 2026 09:49:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.125.139.71 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776851369; cv=none; b=KFmnlGUx3iKLyIPiCYYZKrpw97KJYTlN5Bk6aHYZugA4r3m0JSviM854SjgVRbtbFdP8/ylqBtDlC1UZcKRIsAeUPobJ8m2xpo0/r+gujl8A1+5I9FGmWW79108kV3rH3E479ClfBMRup9lL5ePw07QLlf5jDCNm7/oVxK4yPSs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776851369; c=relaxed/simple; bh=15chuYpccSlT6UpH8TNwNGnGHfksA7xi4fPhMzJSTtA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Q1SQvVqzfcgX5J76iIPnX2+MTFSTANDuKL0OSutYLY/Olj4K9xTiyCtnznUlYSmri33uVLf1XVkqEFhy+M1Qo+xDhh1jTHbxn20ntB4VUNbDh29ixfjlugBkxwjN8+PTIaQXDOALb/hWvA00jsvQPI1sJApdLb1rGLoI1ZFABoo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sony.com; spf=fail smtp.mailfrom=sony.com; dkim=pass (2048-bit key) header.d=sony.com header.i=@sony.com header.b=DgMUIV9B; arc=none smtp.client-ip=211.125.139.71 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sony.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=sony.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sony.com header.i=@sony.com header.b="DgMUIV9B" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sony.com; s=s1jp; t=1776851368; x=1808387368; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=oCL1gEFUP1wdiZ4mPtneZFBWlCiHxBCt8+1MrSojH7w=; b=DgMUIV9BHTGiqw/rwcBi3frMa/ERShyUqL2eFvb6QtgC4SF2vvCIBBtc DjJKU2RsAy38weI5fvy2to2+5ZHVhW/IVZ6Tav3GC7aZ37Wxtz78HRtLa QbhhFYeLBW1TZSId3E+087rZtRGP7/WjwO6HOtLTMmzAKxp+au2FFlxlF 7e7xTdoUXfsRN2SVAO97+7fySNfSoeo5idu0xSwqDxOkSb1/cFzEtdv/3 X9rB/DoF1e9QcCUUxRyX5cBFaIyoGSeahDMla0rNX5XWfYmKAQHd0TDkU TRjD4SOFbBmosxaodC6Te2FqEpsfP4CaBywES6Grwcp5sP9L4vOL/1zQ6 g==; X-CSE-ConnectionGUID: l7LAwCMhRimrHXZdQZKJcA== X-CSE-MsgGUID: BC4Up8KvSqe2F/ELC/B7xg== Received: from unknown (HELO jpmta-ob02-os7.noc.sony.co.jp) ([IPv6:2001:cf8:acf:1104::7]) by jpms-ob01-os7.noc.sony.co.jp with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2026 18:49:20 +0900 X-CSE-ConnectionGUID: SgthmcMQRTCdknWd7vVZsw== X-CSE-MsgGUID: Ta60PQwYQQmW9I62Z0fNyw== X-IronPort-AV: E=Sophos;i="6.23,192,1770562800"; d="scan'208";a="51446140" Received: from unknown (HELO [127.0.1.1]) ([IPv6:2001:cf8:1:573:0:dddd:eb3e:119e]) by jpmta-ob02-os7.noc.sony.co.jp with ESMTP; 22 Apr 2026 18:49:18 +0900 From: Shashank Balaji Date: Wed, 22 Apr 2026 18:49:06 +0900 Subject: [PATCH v3 4/4] docs: driver-api: add mod_name argument to __platform_register_drivers() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260422-acpi_mod_name-v3-4-a184eff9ff6f@sony.com> References: <20260422-acpi_mod_name-v3-0-a184eff9ff6f@sony.com> In-Reply-To: <20260422-acpi_mod_name-v3-0-a184eff9ff6f@sony.com> To: Suzuki K Poulose , Mike Leach , James Clark , Alexander Shishkin , Maxime Coquelin , Alexandre Torgue , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Miguel Ojeda , Boqun Feng , Gary Guo , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Richard Cochran , Jonathan Corbet , Shuah Khan Cc: Rahul Bukte , Shashank Balaji , linux-kernel@vger.kernel.org, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, driver-core@lists.linux.dev, rust-for-linux@vger.kernel.org, linux-doc@vger.kernel.org, Daniel Palmer , Tim Bird X-Mailer: b4 0.16-dev-3bfbc X-Developer-Signature: v=1; a=openpgp-sha256; l=1071; i=shashank.mahadasyam@sony.com; h=from:subject:message-id; bh=15chuYpccSlT6UpH8TNwNGnGHfksA7xi4fPhMzJSTtA=; b=owGbwMvMwCU2bX1+URVTXyjjabUkhswXM2cEchoeX80oYratR2Gj5Zx04SJxhcVGOZ+TJkb7O L9antrWUcrCIMbFICumyFKqVP1r74qgJT1nXivCzGFlAhnCwMUpABMJY2Nk+HNF00Fs57JPb8Uy XdVs19vsf8i6w+K/728jkSYh54ItnowMx7R93hRNCX8S8Stqo8+qT9IKK45LeT3mv7H9mHSG+KL NLAA= X-Developer-Key: i=shashank.mahadasyam@sony.com; a=openpgp; fpr=75227BFABDA852A48CCCEB2196AF6F727A028E55 Co-developed-by: Rahul Bukte Signed-off-by: Rahul Bukte Signed-off-by: Shashank Balaji --- Documentation/driver-api/driver-model/platform.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/driver-api/driver-model/platform.rst b/Documenta= tion/driver-api/driver-model/platform.rst index cf5ff48d3115..9673470bded2 100644 --- a/Documentation/driver-api/driver-model/platform.rst +++ b/Documentation/driver-api/driver-model/platform.rst @@ -70,7 +70,8 @@ Kernel modules can be composed of several platform driver= s. The platform core provides helpers to register and unregister an array of drivers:: =20 int __platform_register_drivers(struct platform_driver * const *drivers, - unsigned int count, struct module *owner); + unsigned int count, struct module *owner, + const char *mod_name); void platform_unregister_drivers(struct platform_driver * const *drivers, unsigned int count); =20 --=20 2.43.0