mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-21 04:53:46 -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:
@@ -80,7 +80,7 @@ ccw_bus_match (struct device * dev, struct device_driver * drv)
|
||||
* specified size. Return length of resulting string (excluding trailing '\0')
|
||||
* even if string doesn't fit buffer (snprintf semantics). */
|
||||
static int snprint_alias(char *buf, size_t size,
|
||||
struct ccw_device_id *id, const char *suffix)
|
||||
const struct ccw_device_id *id, const char *suffix)
|
||||
{
|
||||
int len;
|
||||
|
||||
@@ -101,10 +101,10 @@ static int snprint_alias(char *buf, size_t size,
|
||||
|
||||
/* Set up environment variables for ccw device uevent. Return 0 on success,
|
||||
* non-zero otherwise. */
|
||||
static int ccw_uevent(struct device *dev, struct kobj_uevent_env *env)
|
||||
static int ccw_uevent(const struct device *dev, struct kobj_uevent_env *env)
|
||||
{
|
||||
struct ccw_device *cdev = to_ccwdev(dev);
|
||||
struct ccw_device_id *id = &(cdev->id);
|
||||
const struct ccw_device *cdev = to_ccwdev(dev);
|
||||
const struct ccw_device_id *id = &(cdev->id);
|
||||
int ret;
|
||||
char modalias_buf[30];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user