[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <67a570d64ac4c_30e1782941d@iweiny-mobl.notmuch>
Date: Thu, 6 Feb 2025 20:32:54 -0600
From: Ira Weiny <ira.weiny@...el.com>
To: Jerome Brunet <jbrunet@...libre.com>, Greg Kroah-Hartman
<gregkh@...uxfoundation.org>, Dave Ertman <david.m.ertman@...el.com>, "Ira
Weiny" <ira.weiny@...el.com>, "Rafael J. Wysocki" <rafael@...nel.org>,
"Stephen Boyd" <sboyd@...nel.org>, Arnd Bergmann <arnd@...db.de>
CC: Jerome Brunet <jbrunet@...libre.com>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 1/7] driver core: auxiliary bus: add device creation
helper
Jerome Brunet wrote:
[snip]
Overall this seems like a net benefit!
9 files changed, 160 insertions(+), 348 deletions(-)
1 suggestion I can see though.
> +
> +/**
> + * devm_auxiliary_device_create - create a device on the auxiliary bus
> + * @dev: parent device
> + * @modname: module name used to create the auxiliary driver name.
> + * @devname: auxiliary bus device name
> + * @platform_data: auxiliary bus device platform data
> + * @id: auxiliary bus device id
> + *
> + * Device managed helper to create an auxiliary bus device.
> + * The device create matches driver 'modname.devname' on the auxiliary bus.
> + */
> +struct auxiliary_device *devm_auxiliary_device_create(struct device *dev,
> + const char *modname,
> + const char *devname,
> + void *platform_data,
> + int id)
Almost all of the devm_auxiliary_device_create() calls use KBUILD_MODNAME
as the modname. It seems cleaner to wrap this in a macro like
auxiliary_device_add/__auxiliary_device_add.
Then use __devm_auxiliary_device_create() with the modname for the one
special case.
Ira
Powered by blists - more mailing lists