mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-06 20:53:54 +08:00
driver core: bus: constantify bus_register()
bus_register() is now safe to take a constant * to bus_type, so make that change and mark the subsys_private bus_type * constant as well. Cc: "Rafael J. Wysocki" <rafael@kernel.org> Link: https://lore.kernel.org/r/20230313182918.1312597-24-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
75cff725d9
commit
00c4a3c47d
@ -49,7 +49,7 @@ struct subsys_private {
|
|||||||
struct klist klist_drivers;
|
struct klist klist_drivers;
|
||||||
struct blocking_notifier_head bus_notifier;
|
struct blocking_notifier_head bus_notifier;
|
||||||
unsigned int drivers_autoprobe:1;
|
unsigned int drivers_autoprobe:1;
|
||||||
struct bus_type *bus;
|
const struct bus_type *bus;
|
||||||
struct device *dev_root;
|
struct device *dev_root;
|
||||||
|
|
||||||
struct kset glue_dirs;
|
struct kset glue_dirs;
|
||||||
|
@ -841,7 +841,7 @@ static struct bus_attribute bus_attr_uevent = __ATTR(uevent, 0200, NULL,
|
|||||||
* infrastructure, then register the children subsystems it has:
|
* infrastructure, then register the children subsystems it has:
|
||||||
* the devices and drivers that belong to the subsystem.
|
* the devices and drivers that belong to the subsystem.
|
||||||
*/
|
*/
|
||||||
int bus_register(struct bus_type *bus)
|
int bus_register(const struct bus_type *bus)
|
||||||
{
|
{
|
||||||
int retval;
|
int retval;
|
||||||
struct subsys_private *priv;
|
struct subsys_private *priv;
|
||||||
|
@ -110,7 +110,7 @@ struct bus_type {
|
|||||||
bool need_parent_lock;
|
bool need_parent_lock;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern int __must_check bus_register(struct bus_type *bus);
|
extern int __must_check bus_register(const struct bus_type *bus);
|
||||||
|
|
||||||
extern void bus_unregister(const struct bus_type *bus);
|
extern void bus_unregister(const struct bus_type *bus);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user