@@ -723,7 +723,7 @@ static void hid_device_release(struct device *dev)
723723 * items, though they are not used yet.
724724 */
725725
726- static u8 * fetch_item (__u8 * start , __u8 * end , struct hid_item * item )
726+ static const u8 * fetch_item (const __u8 * start , const __u8 * end , struct hid_item * item )
727727{
728728 u8 b ;
729729
@@ -880,8 +880,8 @@ static int hid_scan_report(struct hid_device *hid)
880880{
881881 struct hid_parser * parser ;
882882 struct hid_item item ;
883- __u8 * start = hid -> dev_rdesc ;
884- __u8 * end = start + hid -> dev_rsize ;
883+ const __u8 * start = hid -> dev_rdesc ;
884+ const __u8 * end = start + hid -> dev_rsize ;
885885 static int (* dispatch_type [])(struct hid_parser * parser ,
886886 struct hid_item * item ) = {
887887 hid_scan_main ,
@@ -946,7 +946,7 @@ static int hid_scan_report(struct hid_device *hid)
946946 * Allocate the device report as read by the bus driver. This function should
947947 * only be called from parse() in ll drivers.
948948 */
949- int hid_parse_report (struct hid_device * hid , __u8 * start , unsigned size )
949+ int hid_parse_report (struct hid_device * hid , const __u8 * start , unsigned size )
950950{
951951 hid -> dev_rdesc = kmemdup (start , size , GFP_KERNEL );
952952 if (!hid -> dev_rdesc )
@@ -1204,10 +1204,10 @@ int hid_open_report(struct hid_device *device)
12041204 struct hid_parser * parser ;
12051205 struct hid_item item ;
12061206 unsigned int size ;
1207- __u8 * start ;
1207+ const __u8 * start ;
12081208 __u8 * buf ;
1209- __u8 * end ;
1210- __u8 * next ;
1209+ const __u8 * end ;
1210+ const __u8 * next ;
12111211 int ret ;
12121212 int i ;
12131213 static int (* dispatch_type [])(struct hid_parser * parser ,
0 commit comments