aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/usb.h
diff options
context:
space:
mode:
authorLuiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>2006-08-26 22:48:11 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-09-27 14:58:55 -0400
commit095bc335360a51623dd8571839bbf465851a7f4b (patch)
treee28c101dd9665b67b137e3e21a8161c1bcf4b898 /drivers/usb/core/usb.h
parent83a07196735dbf371b61d6dffbb7e6a696c633c2 (diff)
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>
Diffstat (limited to 'drivers/usb/core/usb.h')
-rw-r--r--drivers/usb/core/usb.h4
1 files changed, 2 insertions, 2 deletions
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;
53 * no such thing as a platform USB device, so we can steal the use 53 * no such thing as a platform USB device, so we can steal the use
54 * of the platform_data field. */ 54 * of the platform_data field. */
55 55
56static inline int is_usb_device(struct device *dev) 56static inline int is_usb_device(const struct device *dev)
57{ 57{
58 return dev->platform_data == &usb_generic_driver; 58 return dev->platform_data == &usb_generic_driver;
59} 59}
@@ -78,7 +78,7 @@ static inline void mark_quiesced(struct usb_interface *f)
78 f->is_active = 0; 78 f->is_active = 0;
79} 79}
80 80
81static inline int is_active(struct usb_interface *f) 81static inline int is_active(const struct usb_interface *f)
82{ 82{
83 return f->is_active; 83 return f->is_active;
84} 84}