mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 03:27:30 -04:00
coresight: pass THIS_MODULE implicitly through a macro
Rename coresight_init_driver() to coresight_init_driver_with_owner() 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 <gregkh@linuxfoundation.org> Reviewed-by: Leo Yan <leo.yan@arm.com> Co-developed-by: Rahul Bukte <rahul.bukte@sony.com> Signed-off-by: Rahul Bukte <rahul.bukte@sony.com> Signed-off-by: Shashank Balaji <shashank.mahadasyam@sony.com> Link: https://patch.msgid.link/20260518-acpi_mod_name-v5-3-705ccc430885@sony.com Signed-off-by: Danilo Krummrich <dakr@kernel.org>
This commit is contained in:
committed by
Danilo Krummrich
parent
c82dfce478
commit
efc22b3f89
@@ -706,7 +706,7 @@ static int __init catu_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = coresight_init_driver("catu", &catu_driver, &catu_platform_driver, THIS_MODULE);
|
||||
ret = coresight_init_driver("catu", &catu_driver, &catu_platform_driver);
|
||||
tmc_etr_set_catu_ops(&etr_catu_buf_ops);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1694,8 +1694,8 @@ static void __exit coresight_exit(void)
|
||||
module_init(coresight_init);
|
||||
module_exit(coresight_exit);
|
||||
|
||||
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;
|
||||
|
||||
@@ -1713,7 +1713,7 @@ int coresight_init_driver(const char *drv, struct amba_driver *amba_drv,
|
||||
amba_driver_unregister(amba_drv);
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(coresight_init_driver);
|
||||
EXPORT_SYMBOL_GPL(coresight_init_driver_with_owner);
|
||||
|
||||
void coresight_remove_driver(struct amba_driver *amba_drv,
|
||||
struct platform_driver *pdev_drv)
|
||||
|
||||
@@ -757,8 +757,7 @@ static struct platform_driver debug_platform_driver = {
|
||||
|
||||
static int __init debug_init(void)
|
||||
{
|
||||
return coresight_init_driver("debug", &debug_driver, &debug_platform_driver,
|
||||
THIS_MODULE);
|
||||
return coresight_init_driver("debug", &debug_driver, &debug_platform_driver);
|
||||
}
|
||||
|
||||
static void __exit debug_exit(void)
|
||||
|
||||
@@ -412,8 +412,7 @@ static struct amba_driver dynamic_funnel_driver = {
|
||||
|
||||
static int __init funnel_init(void)
|
||||
{
|
||||
return coresight_init_driver("funnel", &dynamic_funnel_driver, &funnel_driver,
|
||||
THIS_MODULE);
|
||||
return coresight_init_driver("funnel", &dynamic_funnel_driver, &funnel_driver);
|
||||
}
|
||||
|
||||
static void __exit funnel_exit(void)
|
||||
|
||||
@@ -418,8 +418,7 @@ static struct amba_driver dynamic_replicator_driver = {
|
||||
|
||||
static int __init replicator_init(void)
|
||||
{
|
||||
return coresight_init_driver("replicator", &dynamic_replicator_driver, &replicator_driver,
|
||||
THIS_MODULE);
|
||||
return coresight_init_driver("replicator", &dynamic_replicator_driver, &replicator_driver);
|
||||
}
|
||||
|
||||
static void __exit replicator_exit(void)
|
||||
|
||||
@@ -1050,7 +1050,7 @@ static struct platform_driver stm_platform_driver = {
|
||||
|
||||
static int __init stm_init(void)
|
||||
{
|
||||
return coresight_init_driver("stm", &stm_driver, &stm_platform_driver, THIS_MODULE);
|
||||
return coresight_init_driver("stm", &stm_driver, &stm_platform_driver);
|
||||
}
|
||||
|
||||
static void __exit stm_exit(void)
|
||||
|
||||
@@ -1046,7 +1046,7 @@ static struct platform_driver tmc_platform_driver = {
|
||||
|
||||
static int __init tmc_init(void)
|
||||
{
|
||||
return coresight_init_driver("tmc", &tmc_driver, &tmc_platform_driver, THIS_MODULE);
|
||||
return coresight_init_driver("tmc", &tmc_driver, &tmc_platform_driver);
|
||||
}
|
||||
|
||||
static void __exit tmc_exit(void)
|
||||
|
||||
@@ -344,7 +344,7 @@ static struct platform_driver itnoc_driver = {
|
||||
|
||||
static int __init tnoc_init(void)
|
||||
{
|
||||
return coresight_init_driver("tnoc", &trace_noc_driver, &itnoc_driver, THIS_MODULE);
|
||||
return coresight_init_driver("tnoc", &trace_noc_driver, &itnoc_driver);
|
||||
}
|
||||
|
||||
static void __exit tnoc_exit(void)
|
||||
|
||||
@@ -1563,8 +1563,7 @@ static struct platform_driver static_tpdm_driver = {
|
||||
|
||||
static int __init tpdm_init(void)
|
||||
{
|
||||
return coresight_init_driver("tpdm", &dynamic_tpdm_driver, &static_tpdm_driver,
|
||||
THIS_MODULE);
|
||||
return coresight_init_driver("tpdm", &dynamic_tpdm_driver, &static_tpdm_driver);
|
||||
}
|
||||
|
||||
static void __exit tpdm_exit(void)
|
||||
|
||||
@@ -310,7 +310,7 @@ static struct platform_driver tpiu_platform_driver = {
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
static void __exit tpiu_exit(void)
|
||||
|
||||
@@ -691,8 +691,10 @@ coresight_find_output_type(struct coresight_platform_data *pdata,
|
||||
enum coresight_dev_type type,
|
||||
union coresight_dev_subtype subtype);
|
||||
|
||||
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)
|
||||
|
||||
void coresight_remove_driver(struct amba_driver *amba_drv,
|
||||
struct platform_driver *pdev_drv);
|
||||
|
||||
Reference in New Issue
Block a user