USB: constify usb_mon_operations structure
The usb_mon_operations structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
c7c7806700
commit
6fb8ac81cb
@@ -3000,7 +3000,7 @@ EXPORT_SYMBOL_GPL(usb_hcd_platform_shutdown);
|
||||
|
||||
#if defined(CONFIG_USB_MON) || defined(CONFIG_USB_MON_MODULE)
|
||||
|
||||
struct usb_mon_operations *mon_ops;
|
||||
const struct usb_mon_operations *mon_ops;
|
||||
|
||||
/*
|
||||
* The registration is unlocked.
|
||||
@@ -3010,7 +3010,7 @@ struct usb_mon_operations *mon_ops;
|
||||
* symbols from usbcore, usbcore gets referenced and cannot be unloaded first.
|
||||
*/
|
||||
|
||||
int usb_mon_register (struct usb_mon_operations *ops)
|
||||
int usb_mon_register(const struct usb_mon_operations *ops)
|
||||
{
|
||||
|
||||
if (mon_ops)
|
||||
|
Reference in New Issue
Block a user