From nobody Mon May 25 05:14:16 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 687193ED125; Mon, 18 May 2026 10:30:33 +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=1779100250; cv=none; b=isGwllJ0hcQxQ/l+hj7JJZ90Jp3akbNwHpua3G4rL5WJVTrc1t7TZpn+/g0YRKEsPdJUFe+48QZ0zetJLOmiuQs2xnpm+z9V4eBltMWpbA6LMgBVB1d56vNkgajA7FFgQHMI3e5IV2QSC3KFc1PAhoQWAdkGttOYVs1cl22lQKk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779100250; c=relaxed/simple; bh=cb8qj4xhg343NbZdyo6rpt+QT8xtsS/YnAvcGC2vlak=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=d0L/NHWWbQwnZW2uV0r8zI1hjjpwSFFr92SLCNIOkS8soCcXRsy5ww7mE8lD/nJJXajIy0rkuKUVnxC+wD7r+dPBspFMrXvSXYFEqoh6i22EV6uTiFXcUCcrNBGWL50aXznGpuGbzvtRraF4U+lg8v+x7P0lP+qw2GNcN64MNgY= 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=mSUKZS6m; 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="mSUKZS6m" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sony.com; s=s1jp; t=1779100236; x=1810636236; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=pNRQ31g1BKh9xMFz1czeGZGptMasxgt/rCDZtMGdZYw=; b=mSUKZS6mRfFd2hGiWVdP9kamhoRV/XHFt734XGTonGEmUXPpdlINMyzr PTw1RaTVYLZv1O2Sr0Hg92DKBRxG5N/pwpqL7O6+UcZzuLxKzLqbzKRvC Ax6sK0Vjeq3Xs70hi8giU+wFqvk7665PxAfkTQ/1YRDu9qlrn9+FuoI2f CDOjG8Q8Fvv8OIzvb9Hyjf3LMNcgCD24/yNB4gGbfE06TGj66Y5FmQEkV H4zx2iexb9CX3VCJUsrB/+rWfg3tz7zBP5RO1tNmZsVyGR94PGQ5udz7B 9JB7Ux8DpdicYXY9oZda0bdVyInuZe/VjsnJoRLHY3y6o95bU0NXS3xhZ g==; X-CSE-ConnectionGUID: xuDFvgJCTaaKYWFU+CO/Mw== X-CSE-MsgGUID: TfAWBPG1Q2Wj4gsTIrf5eA== 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; 18 May 2026 19:20:03 +0900 X-CSE-ConnectionGUID: eNQHig6rTSyeNFsq5eNCUA== X-CSE-MsgGUID: bJzPrHHERBWQt31IwEhhsw== X-IronPort-AV: E=Sophos;i="6.23,241,1770562800"; d="scan'208";a="56041668" Received: from unknown (HELO [127.0.1.1]) ([IPv6:2001:cf8:1:573:0:dddd:6b3e:119e]) by jpmta-ob02-os7.noc.sony.co.jp with ESMTP; 18 May 2026 19:20:03 +0900 From: Shashank Balaji Date: Mon, 18 May 2026 19:19:57 +0900 Subject: [PATCH v5 1/4] soc/tegra: cbb: Move driver registration from pure_initcall to core_initcall 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: <20260518-acpi_mod_name-v5-1-705ccc430885@sony.com> References: <20260518-acpi_mod_name-v5-0-705ccc430885@sony.com> In-Reply-To: <20260518-acpi_mod_name-v5-0-705ccc430885@sony.com> To: Suzuki K Poulose , James Clark , Alexander Shishkin , 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 , Jonathan Corbet , Shuah Khan , Luis Chamberlain , Petr Pavlu , Daniel Gomez , Sami Tolvanen , Aaron Tomlin , Mike Leach , Leo Yan , Thierry Reding , Jonathan Hunter , Mike Leach 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 , linux-modules@vger.kernel.org, linux-tegra@vger.kernel.org, Sumit Gupta X-Mailer: b4 0.16-dev-3bfbc X-Developer-Signature: v=1; a=openpgp-sha256; l=2338; i=shashank.mahadasyam@sony.com; h=from:subject:message-id; bh=cb8qj4xhg343NbZdyo6rpt+QT8xtsS/YnAvcGC2vlak=; b=owGbwMvMwCU2bX1+URVTXyjjabUkhiyu5xfqvy0NverW9HcJ0/+jbb/frg7dt2Tnlxm6R3Qf1 ehr+fDv6ShlYRDjYpAVU2QpVar+tXdF0JKeM68VYeawMoEMYeDiFICJ/FRh+Ml4ZabnJgHe1ruZ 66Rfir73lW7Y/ehHoIfvgbd5bt4z/wQw/E/Mmq3LedrX7smVb8HzxcRfmQT6WPgLH3r16UWy0bK UhywA X-Developer-Key: i=shashank.mahadasyam@sony.com; a=openpgp; fpr=75227BFABDA852A48CCCEB2196AF6F727A028E55 Commit "driver core: platform: set mod_name in driver registration" will set struct device_driver's mod_name member for platform driver registration. Fo= r a driver to be registered with its mod_name set, module_kset needs to be initialized, which currently happens in a subsys_initcall in param_sysfs_in= it(). The tegra cbb drivers register themselves before module_kset init, in a pure_initcall. This works currently because lookup_or_create_module_kobject= (), which dereferences module_kset via kset_find_obj(), is not called if mod_na= me is not set, which is the case now. So in preparation for the commit "driver core: platform: set mod_name in dr= iver registration", move tegra cbb driver registration to core_initcall level, and commit "kernel: param: initialize module_kset in a pure_initcall" will move module= _kset init to pure_initcall level, ensuring module_kset init happens before tegra= cbb driver registration. Suggested-by: Gary Guo Acked-by: Sumit Gupta Co-developed-by: Rahul Bukte Signed-off-by: Rahul Bukte Signed-off-by: Shashank Balaji --- Patch 4 depends on this patch --- drivers/soc/tegra/cbb/tegra194-cbb.c | 2 +- drivers/soc/tegra/cbb/tegra234-cbb.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/tegra/cbb/tegra194-cbb.c b/drivers/soc/tegra/cbb/t= egra194-cbb.c index ab75d50cc85c..2f69e104c838 100644 --- a/drivers/soc/tegra/cbb/tegra194-cbb.c +++ b/drivers/soc/tegra/cbb/tegra194-cbb.c @@ -2342,7 +2342,7 @@ static int __init tegra194_cbb_init(void) { return platform_driver_register(&tegra194_cbb_driver); } -pure_initcall(tegra194_cbb_init); +core_initcall(tegra194_cbb_init); =20 static void __exit tegra194_cbb_exit(void) { diff --git a/drivers/soc/tegra/cbb/tegra234-cbb.c b/drivers/soc/tegra/cbb/t= egra234-cbb.c index fb26f085f691..785072fa4e85 100644 --- a/drivers/soc/tegra/cbb/tegra234-cbb.c +++ b/drivers/soc/tegra/cbb/tegra234-cbb.c @@ -1774,7 +1774,7 @@ static int __init tegra234_cbb_init(void) { return platform_driver_register(&tegra234_cbb_driver); } -pure_initcall(tegra234_cbb_init); +core_initcall(tegra234_cbb_init); =20 static void __exit tegra234_cbb_exit(void) { --=20 2.43.0 From nobody Mon May 25 05:14:16 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 C7D8A3E9C01; Mon, 18 May 2026 10:30:35 +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=1779100240; cv=none; b=BfqAnEhSjHXqWaP0KDTOrQ3dtu2fQmie/fgSYJy3VDUd6w5W0jelBE/YNvtpcFtLzfWmDdznd8pgqk4K4qrLk9rrYZa87tCKmUzrzFjUrFu0vy43FMV8XVQWR8EWPsU2tlxYmmFu5iiux9pYXf5A6hO/SpWB+fdqgoXWJQOZz/k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779100240; c=relaxed/simple; bh=50TjhgnVmYRUF6Xy+gJCwmaxbDzOViHP9xJuJuhoEVo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=P/8lkBS9QNEse9mDZBfdPEjxWAazY8aLKykVmmzQ/k2hM4zEHjWb+R2IBpefr8lfp+eZ8+XsPvWFvdKxLlx6YNQWFB8r6G/DmoobafDPG1HtVcI+1Oa8mHwt8UdHa7T0xwR/86kYSfWg8lZHzlz5M++4nPqWCZxRn2ch6n/pJj4= 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=kkKbhtnc; 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="kkKbhtnc" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sony.com; s=s1jp; t=1779100236; x=1810636236; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=57BKhrzrww/oj2bQTyT2tJUOOogiCFZ1vx7aZ99NI/s=; b=kkKbhtncxSfgAJHF0Gj1Nc7iFGLcurCjvuZG33ed+44TA8641+INzAX9 I3+sy4bwhczrzgY9QSX9tfK0x7QkIJvVQlknfHTdIDONWIh/ILxF5Vbxh CT7zzQ545cvroygdCCJsiEtUOo3A4tozD0HyueTHcPYLixD0KNRg8WVeG 6QRG3IEmXZJwEdYeCHKZDUZPueyHckDaWMMm5mZTqN/C32g45PJypYVTX wBeah2ITwG+pIqPIzZo6DzM6s8w1KS4NYwUSgvmOk8MAj24tBQVYNbxUD nNfOr8zOVnRWQ/RNRJiMYdYCs60dzAameXdbjg52nLREY/P0KgG+BVqnf A==; X-CSE-ConnectionGUID: LMr5h8RXTJ65sbn4Ssps7g== X-CSE-MsgGUID: 731x69l5S825Um3O2xXqEQ== 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; 18 May 2026 19:20:04 +0900 X-CSE-ConnectionGUID: 4jQSlB5ITpKgajH3gphI2g== X-CSE-MsgGUID: spYUaIejTPeTbctKBbAqhA== X-IronPort-AV: E=Sophos;i="6.23,241,1770562800"; d="scan'208";a="56041670" Received: from unknown (HELO [127.0.1.1]) ([IPv6:2001:cf8:1:573:0:dddd:6b3e:119e]) by jpmta-ob02-os7.noc.sony.co.jp with ESMTP; 18 May 2026 19:20:04 +0900 From: Shashank Balaji Date: Mon, 18 May 2026 19:19:58 +0900 Subject: [PATCH v5 2/4] kernel: param: initialize module_kset in a pure_initcall 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: <20260518-acpi_mod_name-v5-2-705ccc430885@sony.com> References: <20260518-acpi_mod_name-v5-0-705ccc430885@sony.com> In-Reply-To: <20260518-acpi_mod_name-v5-0-705ccc430885@sony.com> To: Suzuki K Poulose , James Clark , Alexander Shishkin , 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 , Jonathan Corbet , Shuah Khan , Luis Chamberlain , Petr Pavlu , Daniel Gomez , Sami Tolvanen , Aaron Tomlin , Mike Leach , Leo Yan , Thierry Reding , Jonathan Hunter , Mike Leach 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 , linux-modules@vger.kernel.org, linux-tegra@vger.kernel.org, Sumit Gupta X-Mailer: b4 0.16-dev-3bfbc X-Developer-Signature: v=1; a=openpgp-sha256; l=1488; i=shashank.mahadasyam@sony.com; h=from:subject:message-id; bh=50TjhgnVmYRUF6Xy+gJCwmaxbDzOViHP9xJuJuhoEVo=; b=owGbwMvMwCU2bX1+URVTXyjjabUkhiyu5xdWZa8Xc9j/a/HiLfnr7GZMC0mpaJOM53hY9ts7L vfTnPfBHaUsDGJcDLJiiiylStW/9q4IWtJz5rUizBxWJpAhDFycAjCRAGlGhp35Qbwq4genvz/c eqls3p7zR5wUv7ScuuN55aj5/X/+XJYMf+X3CN8/0yHf2HpXsvXSPRsfwZ+H1wVz7Up/0GhxY2f iTUYA X-Developer-Key: i=shashank.mahadasyam@sony.com; a=openpgp; fpr=75227BFABDA852A48CCCEB2196AF6F727A028E55 Commit "driver core: platform: set mod_name in driver registration" will set struct device_driver's mod_name member for platform driver registration. Fo= r a driver to be registered with its mod_name set, module_kset needs to be initialized, which currently happens in a subsys_initcall in param_sysfs_in= it(). The tegra cbb drivers register themselves before module_kset init, in a core_initcall. This works currently because lookup_or_create_module_kobject= (), which dereferences module_kset via kset_find_obj(), is not called if mod_na= me is not set, which is the case now. So in preparation for the commit "driver core: platform: set mod_name in dr= iver registration", move module_kset init to pure_initcall level, ensuring it happens before te= gra cbb driver registration. Suggested-by: Gary Guo Co-developed-by: Rahul Bukte Signed-off-by: Rahul Bukte Signed-off-by: Shashank Balaji --- Patch 4 depends on this patch --- kernel/params.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/params.c b/kernel/params.c index 74d620bc2521..ac088d4b09a9 100644 --- a/kernel/params.c +++ b/kernel/params.c @@ -957,7 +957,7 @@ static int __init param_sysfs_init(void) =20 return 0; } -subsys_initcall(param_sysfs_init); +pure_initcall(param_sysfs_init); =20 /* * param_sysfs_builtin_init - add sysfs version and parameter --=20 2.43.0 From nobody Mon May 25 05:14:16 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 D92B032470E; Mon, 18 May 2026 10:20:12 +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=1779099616; cv=none; b=ubzbyKJrBk+tr8g65znXwDAJMPhzjuxeVMe4o+3ETaxLhz+ArOE93j7mmr7S+2NQXvLOluTKhHyuiyAdHfeRKOZcnANO6FM7sfMSJVQQ7Wt9YcbxuFJEmHFDi/xV3bGkw2j0dwPF3nL66s22tYGr3960chx+lWbIRxsrQm0Rp1w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779099616; c=relaxed/simple; bh=lnmr+Tsr/Pi3mBRQX9k33KTQHyV3H2FAwHmofyYMs7Q=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=CqZDjWEw8de23t0RQL9ru5dUnDdREGuM63BK3uwOfCtBNKqEdUpsPLS8i6dIBggPMoZC/nNQzt49ig6Xq2mXPHdNDPvAN0bcbmuwXK+qrG1Khv4vCOP70YijFHKiX6hNGnAMQkuYGha7dbHO1MKBEt9cmIKkFQcDASaXJvOzB3I= 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=L0efM9Xg; 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="L0efM9Xg" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sony.com; s=s1jp; t=1779099613; x=1810635613; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=dyx/WAd/4hjOcMcsJmCxGjIgR8e2a5jk1JUwFrJZSao=; b=L0efM9XgRixXcbt/6b3LVqSnMGrTsEpaDjthjvw20UWUNo/aPPILw5Bw cDgwxXTtkPsTHp2H0MobU54Ystd7pN4X0yrX/sD0KgP5mr18cVQ9VgDEe XKQnrD0+2ohYIEedjdmfLMDOZg35OkidZnHQ0gjIfsXKIq++TPPrSTaG2 VBDwUUqgOKGPYlKI0xsUHVpSh+ZCtfeHcBi75QAoGmJyGXKVBNbx2Mu1I wYNpPryP/s3+5GVb6IDVWhrgcQUX6v1yeVEcVzjHUXLWnLff+Z8crfXD8 N7slbHiVCrTHRzqeFQaohgnCtT60ZKBJmzpu1KBDJqf7Xk2sFcF76xNyh A==; X-CSE-ConnectionGUID: yO9V46fRRc+PhGmlKW9uLQ== X-CSE-MsgGUID: qAL+DhRaSoOBHbKOGlzjRQ== 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; 18 May 2026 19:20:05 +0900 X-CSE-ConnectionGUID: XQMiEi2RTcWpArWyYri4mg== X-CSE-MsgGUID: VrHP121bRvWEDxjNnwRL5g== X-IronPort-AV: E=Sophos;i="6.23,241,1770562800"; d="scan'208";a="56041672" Received: from unknown (HELO [127.0.1.1]) ([IPv6:2001:cf8:1:573:0:dddd:6b3e:119e]) by jpmta-ob02-os7.noc.sony.co.jp with ESMTP; 18 May 2026 19:20:05 +0900 From: Shashank Balaji Date: Mon, 18 May 2026 19:19:59 +0900 Subject: [PATCH v5 3/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: <20260518-acpi_mod_name-v5-3-705ccc430885@sony.com> References: <20260518-acpi_mod_name-v5-0-705ccc430885@sony.com> In-Reply-To: <20260518-acpi_mod_name-v5-0-705ccc430885@sony.com> To: Suzuki K Poulose , James Clark , Alexander Shishkin , 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 , Jonathan Corbet , Shuah Khan , Luis Chamberlain , Petr Pavlu , Daniel Gomez , Sami Tolvanen , Aaron Tomlin , Mike Leach , Leo Yan , Thierry Reding , Jonathan Hunter , Mike Leach 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 , linux-modules@vger.kernel.org, linux-tegra@vger.kernel.org, Sumit Gupta X-Mailer: b4 0.16-dev-3bfbc X-Developer-Signature: v=1; a=openpgp-sha256; l=8553; i=shashank.mahadasyam@sony.com; h=from:subject:message-id; bh=lnmr+Tsr/Pi3mBRQX9k33KTQHyV3H2FAwHmofyYMs7Q=; b=owGbwMvMwCU2bX1+URVTXyjjabUkhiyu5xeL6j6mXzyT/uGF70aDo31uxSyL06W1tC23mtqIz HF4bne5o5SFQYyLQVZMkaVUqfrX3hVBS3rOvFaEmcPKBDKEgYtTACYiwcTI0Kt24U3Bli+PBDzu vaxdf7+6Ick61OyqYMXqfRpLkqoTShn+ux7vjjhvIrh925kNh5vO88i5vRRa57VuMcu+FRlTLsv YcQMA X-Developer-Key: i=shashank.mahadasyam@sony.com; a=openpgp; fpr=75227BFABDA852A48CCCEB2196AF6F727A028E55 Rename coresight_init_driver() to coresight_init_driver_with_owner() and re= place it with a macro wrapper that passes THIS_MODULE implicitly. This is in line= with what other buses do. Suggested-by: Greg Kroah-Hartman Reviewed-by: Leo Yan Co-developed-by: Rahul Bukte Signed-off-by: Rahul Bukte Signed-off-by: Shashank Balaji --- Patch 4 depends on this patch --- drivers/hwtracing/coresight/coresight-catu.c | 2 +- drivers/hwtracing/coresight/coresight-core.c | 6 +++--- 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 | 6 ++++-- 11 files changed, 16 insertions(+), 18 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-catu.c b/drivers/hwtraci= ng/coresight/coresight-catu.c index ce71dcddfca2..0c8698c8fc5e 100644 --- a/drivers/hwtracing/coresight/coresight-catu.c +++ b/drivers/hwtracing/coresight/coresight-catu.c @@ -706,7 +706,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 46f247f73cf6..54ad5193b850 100644 --- a/drivers/hwtracing/coresight/coresight-core.c +++ b/drivers/hwtracing/coresight/coresight-core.c @@ -1694,8 +1694,8 @@ 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, - struct platform_driver *pdev_drv, struct module *owner) +int coresight_init_driver_with_owner(const char *drv, struct amba_driver *= amba_drv, + struct platform_driver *pdev_drv, struct module *owner) { int ret; =20 @@ -1713,7 +1713,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_with_owner); =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 3f56ceccd8c9..0abc11f0690c 100644 --- a/drivers/hwtracing/coresight/coresight-funnel.c +++ b/drivers/hwtracing/coresight/coresight-funnel.c @@ -412,8 +412,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 07fc04f53b88..2f382de357ee 100644 --- a/drivers/hwtracing/coresight/coresight-replicator.c +++ b/drivers/hwtracing/coresight/coresight-replicator.c @@ -418,8 +418,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 aca6cec7885a..4e860519a73f 100644 --- a/drivers/hwtracing/coresight/coresight-stm.c +++ b/drivers/hwtracing/coresight/coresight-stm.c @@ -1050,7 +1050,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 c89fe996af23..bc5a133ada3e 100644 --- a/drivers/hwtracing/coresight/coresight-tmc-core.c +++ b/drivers/hwtracing/coresight/coresight-tmc-core.c @@ -1046,7 +1046,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 96a25877b824..9e8de4323d28 100644 --- a/drivers/hwtracing/coresight/coresight-tnoc.c +++ b/drivers/hwtracing/coresight/coresight-tnoc.c @@ -344,7 +344,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 eaf7210af648..8464edbba2d4 100644 --- a/drivers/hwtracing/coresight/coresight-tpdm.c +++ b/drivers/hwtracing/coresight/coresight-tpdm.c @@ -1563,8 +1563,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 b8560b140e0f..7b029d2eb389 100644 --- a/drivers/hwtracing/coresight/coresight-tpiu.c +++ b/drivers/hwtracing/coresight/coresight-tpiu.c @@ -310,7 +310,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 2131febebee9..cd8fb47a1192 100644 --- a/include/linux/coresight.h +++ b/include/linux/coresight.h @@ -691,8 +691,10 @@ coresight_find_output_type(struct coresight_platform_d= ata *pdata, enum coresight_dev_type type, union coresight_dev_subtype subtype); =20 -int coresight_init_driver(const char *drv, struct amba_driver *amba_drv, - struct platform_driver *pdev_drv, struct module *owner); +int coresight_init_driver_with_owner(const char *drv, struct amba_driver *= amba_drv, + struct platform_driver *pdev_drv, struct module *owner); +#define coresight_init_driver(drv, amba_drv, pdev_drv) \ + coresight_init_driver_with_owner(drv, amba_drv, pdev_drv, THIS_MODULE) =20 void coresight_remove_driver(struct amba_driver *amba_drv, struct platform_driver *pdev_drv); --=20 2.43.0 From nobody Mon May 25 05:14:16 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 786613815F3; Mon, 18 May 2026 10:20:16 +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=1779099619; cv=none; b=cBKJKFlWe8bCNe4RZU84OJ6UthQ0EqmfXhm03fHcbeAXdJjPCvFrSZXQTZ0TQLCkD+Ro9pdjtdK/Gov5oeoMTIPJ7n4wROMgsN1sLxvgAH9jVx4wR/40/arW4YW0qQelERxqJNpvRrFt1CvTK6qdsESC84b/e6o3+xclvz5TVLI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779099619; c=relaxed/simple; bh=7RmL7RpLDjTb7OFP3+8ENtJ07SYTLx3tLFTfJEYLdO0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ihRmT+1Nj4mLe3uYxiK44hTVWz6AKFQSKXM7a8b5WVzgM6+eIvVpO4G4Fhz2leCA60R42MorXqjxnhco27meOEOdkLqGbxffOey5X4fa9Wx3e868HDpoo8S3hfgQJH74vYK1SI+TytoQsNkrDNHUiWFmu0LvCYjaEWfncJLJkig= 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=uK7LWmqe; 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="uK7LWmqe" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sony.com; s=s1jp; t=1779099617; x=1810635617; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=bMlxrlY09I0+URao4dl7KEWZ0T0fHCJmeuASJ1zvd4E=; b=uK7LWmqewV7Py95oXCFoq3MpT3SjtSK4sUmuukgeMs3plMRYShNrVgLa j4EwGl713tnkYz33mnLNE/dXsfCUAVI22oZeJJaKnJxDBh4a9YOhNwvMM azmFzRbJjDlatELomsCq4j5KNdjSrgaCXQqNV5z1QLOWP68laj59wIJZd TC7dI6kUQp/NRxAUFzJvO/yD6iOgARU5/o6Y1IgDyIiUVR/DIRcrfBiAt 0v7qCbtQhAcVQDlKW95m5NL9nHzuQdgMFevdnbbCqoH0/p9zVf/ZAtBA/ 8kXLLe1MYc68oMh/a1KG9ZO9UGl5FTqWks9lQVSphKEwkXNPoQtlR25ob w==; X-CSE-ConnectionGUID: 74JTESDIR5+hgo5Ntldugw== X-CSE-MsgGUID: 4McWWwJJQEWLuMA3eTdPbw== 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; 18 May 2026 19:20:06 +0900 X-CSE-ConnectionGUID: Gv+mPeDIQ3qMzddEJ2Zy3Q== X-CSE-MsgGUID: KtoDGItcQg60rTP0IxeYBw== X-IronPort-AV: E=Sophos;i="6.23,241,1770562800"; d="scan'208";a="56041678" Received: from unknown (HELO [127.0.1.1]) ([IPv6:2001:cf8:1:573:0:dddd:6b3e:119e]) by jpmta-ob02-os7.noc.sony.co.jp with ESMTP; 18 May 2026 19:20:06 +0900 From: Shashank Balaji Date: Mon, 18 May 2026 19:20:00 +0900 Subject: [PATCH v5 4/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: <20260518-acpi_mod_name-v5-4-705ccc430885@sony.com> References: <20260518-acpi_mod_name-v5-0-705ccc430885@sony.com> In-Reply-To: <20260518-acpi_mod_name-v5-0-705ccc430885@sony.com> To: Suzuki K Poulose , James Clark , Alexander Shishkin , 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 , Jonathan Corbet , Shuah Khan , Luis Chamberlain , Petr Pavlu , Daniel Gomez , Sami Tolvanen , Aaron Tomlin , Mike Leach , Leo Yan , Thierry Reding , Jonathan Hunter , Mike Leach 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 , linux-modules@vger.kernel.org, linux-tegra@vger.kernel.org, Sumit Gupta X-Mailer: b4 0.16-dev-3bfbc X-Developer-Signature: v=1; a=openpgp-sha256; l=11357; i=shashank.mahadasyam@sony.com; h=from:subject:message-id; bh=7RmL7RpLDjTb7OFP3+8ENtJ07SYTLx3tLFTfJEYLdO0=; b=owGbwMvMwCU2bX1+URVTXyjjabUkhiyu5xffV1gf+bPHiPeM3eu/YszJVzVnluxZKrNU5nWU3 zRR5bikjlIWBjEuBlkxRZZSpepfe1cELek581oRZg4rE8gQBi5OAZiIAgcjw8eJjT+mqasuem79 ujGncmqEVEpg/9NUWxXZHSyiu/58/cDwV+aHZ4/OBrmkm6u+3f4VMEF8SljrXPbSD62nL4f+1/w syQoA 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, 2, 3 --- Documentation/driver-api/driver-model/platform.rst | 3 ++- 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 +++- 6 files changed, 34 insertions(+), 21 deletions(-) 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 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 54ad5193b850..94ee24afdc6d 100644 --- a/drivers/hwtracing/coresight/coresight-core.c +++ b/drivers/hwtracing/coresight/coresight-core.c @@ -1695,7 +1695,8 @@ module_init(coresight_init); module_exit(coresight_exit); =20 int coresight_init_driver_with_owner(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 @@ -1705,7 +1706,7 @@ int coresight_init_driver_with_owner(const char *drv,= struct amba_driver *amba_d 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 cd8fb47a1192..1cf85d772bea 100644 --- a/include/linux/coresight.h +++ b/include/linux/coresight.h @@ -692,9 +692,10 @@ coresight_find_output_type(struct coresight_platform_d= ata *pdata, union coresight_dev_subtype subtype); =20 int coresight_init_driver_with_owner(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); #define coresight_init_driver(drv, amba_drv, pdev_drv) \ - coresight_init_driver_with_owner(drv, amba_drv, pdev_drv, THIS_MODULE) + coresight_init_driver_with_owner(drv, amba_drv, pdev_drv, THIS_MODULE, KB= UILD_MODNAME) =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