From 095bc335360a51623dd8571839bbf465851a7f4b Mon Sep 17 00:00:00 2001 From: "Luiz Fernando N. Capitulino" Date: Sat, 26 Aug 2006 23:48:11 -0300 Subject: 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 Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/usb.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/usb/core/usb.h') diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h index 6096ead2758..67da6d0b316 100644 --- a/drivers/usb/core/usb.h +++ b/drivers/usb/core/usb.h @@ -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; } -- cgit v1.2.3