USB core: Use const where possible.

This patch marks some USB core's functions parameters as const. This
improves the design (we're saying to the caller that its parameter is
not going to be modified) and may help in compiler's optimisation work.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Luiz Fernando N. Capitulino
2006-08-26 23:48:11 -03:00
committed by Greg Kroah-Hartman
parent 83a0719673
commit 095bc33536
3 changed files with 22 additions and 21 deletions

View File

@ -53,7 +53,7 @@ extern struct usb_device_driver usb_generic_driver;
* no such thing as a platform USB device, so we can steal the use
* of the platform_data field. */
static inline int is_usb_device(struct device *dev)
static inline int is_usb_device(const struct device *dev)
{
return dev->platform_data == &usb_generic_driver;
}
@ -78,7 +78,7 @@ static inline void mark_quiesced(struct usb_interface *f)
f->is_active = 0;
}
static inline int is_active(struct usb_interface *f)
static inline int is_active(const struct usb_interface *f)
{
return f->is_active;
}