@@ -77,8 +77,8 @@ static void wacom_scramble(__u8 *image)
__u16 mask;
__u16 s1;
__u16 s2;
- __u16 r1 ;
- __u16 r2 ;
+ __u16 r1;
+ __u16 r2;
__u16 r;
__u8 buf[256];
int i, w, x, y, z;
@@ -336,7 +336,8 @@ static void wacom_set_features(struct hid_device *hdev, u8 speed)
switch (hdev->product) {
case USB_DEVICE_ID_WACOM_GRAPHIRE_BLUETOOTH:
- rep_data[0] = 0x03 ; rep_data[1] = 0x00;
+ rep_data[0] = 0x03;
+ rep_data[1] = 0x00;
limit = 3;
do {
ret = hdev->hid_output_raw_report(hdev, rep_data, 2,
@@ -403,9 +404,11 @@ static ssize_t wacom_store_speed(struct device *dev,
{
struct hid_device *hdev = container_of(dev, struct hid_device, dev);
int new_speed;
+ int error;
- if (sscanf(buf, "%1d", &new_speed ) != 1)
- return -EINVAL;
+ error = kstrtoint(buf, 10, &new_speed);
+ if (error)
+ return error;
if (new_speed == 0 || new_speed == 1) {
wacom_set_features(hdev, new_speed);