forked from drath/libratbag
hidpp10: use a #define for the max page number
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
@@ -1023,7 +1023,7 @@ hidpp10_read_memory(struct hidpp10_device *dev, uint8_t page, uint16_t offset,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (page > 31)
|
||||
if (page > HIDPP10_MAX_PAGE_NUMBER)
|
||||
return -EINVAL;
|
||||
|
||||
hidpp_log_raw(&dev->base, "Reading memory page %d, offset %#x\n", page, offset);
|
||||
|
||||
@@ -38,6 +38,8 @@
|
||||
* 0 is zeroed, 1 and 2 are garbage, all above 6 is garbage */
|
||||
#define HIDPP10_NUM_PROFILES 3
|
||||
|
||||
#define HIDPP10_MAX_PAGE_NUMBER 31
|
||||
|
||||
struct hidpp10_device {
|
||||
struct hidpp_device base;
|
||||
unsigned index;
|
||||
|
||||
Reference in New Issue
Block a user