From bf49ac84c8bd6704459ae3ee7a18f7db99475519 Mon Sep 17 00:00:00 2001 From: Patrick Mochel Date: Mon, 11 Aug 2003 19:07:16 -0700 Subject: [driver model] Change class functions to const arguments. From Stephen Hemminger: Several of the class_device functions don't modify their arguments and can take const pointers. --- include/linux/device.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'include/linux') diff --git a/include/linux/device.h b/include/linux/device.h index 2795b85ac6f1..6d711633d263 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -182,8 +182,8 @@ struct class_attribute class_attr_##_name = { \ .store = _store, \ }; -extern int class_create_file(struct class *, struct class_attribute *); -extern void class_remove_file(struct class *, struct class_attribute *); +extern int class_create_file(struct class *, const struct class_attribute *); +extern void class_remove_file(struct class *, const struct class_attribute *); struct class_device { @@ -234,8 +234,10 @@ struct class_device_attribute class_device_attr_##_name = { \ .store = _store, \ }; -extern int class_device_create_file(struct class_device *, struct class_device_attribute *); -extern void class_device_remove_file(struct class_device *, struct class_device_attribute *); +extern int class_device_create_file(struct class_device *, + const struct class_device_attribute *); +extern void class_device_remove_file(struct class_device *, + const struct class_device_attribute *); struct class_interface { -- cgit v1.2.3