summaryrefslogtreecommitdiff
path: root/drivers/usb/core/usb.h
diff options
context:
space:
mode:
authorLuiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>2006-08-26 23:48:11 -0300
committerGreg Kroah-Hartman <gregkh@suse.de>2006-09-27 11:58:55 -0700
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 6096ead2758c..67da6d0b316f 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;
}