mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
driver core: make struct bus_type.uevent() take a const *
The uevent() callback in struct bus_type should not be modifying the device that is passed into it, so mark it as a const * and propagate the function signature changes out into all relevant subsystems that use this callback. Acked-by: Rafael J. Wysocki <rafael@kernel.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20230111113018.459199-16-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
@@ -552,7 +552,7 @@ static int parisc_generic_match(struct device *dev, struct device_driver *drv)
|
||||
return match_device(to_parisc_driver(drv), to_parisc_device(dev));
|
||||
}
|
||||
|
||||
static ssize_t make_modalias(struct device *dev, char *buf)
|
||||
static ssize_t make_modalias(const struct device *dev, char *buf)
|
||||
{
|
||||
const struct parisc_device *padev = to_parisc_device(dev);
|
||||
const struct parisc_device_id *id = &padev->id;
|
||||
@@ -562,7 +562,7 @@ static ssize_t make_modalias(struct device *dev, char *buf)
|
||||
(u32)id->sversion);
|
||||
}
|
||||
|
||||
static int parisc_uevent(struct device *dev, struct kobj_uevent_env *env)
|
||||
static int parisc_uevent(const struct device *dev, struct kobj_uevent_env *env)
|
||||
{
|
||||
const struct parisc_device *padev;
|
||||
char modalias[40];
|
||||
|
||||
Reference in New Issue
Block a user