提交 a28764ef 编写于 作者: S Stefan Achatz 提交者: Jiri Kosina

HID: roccat: Use new hid_err macros

Using the new hid_err macros instead of dev_err.
Signed-off-by: NStefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 cb38cd87
...@@ -358,21 +358,20 @@ static int arvo_init_specials(struct hid_device *hdev) ...@@ -358,21 +358,20 @@ static int arvo_init_specials(struct hid_device *hdev)
arvo = kzalloc(sizeof(*arvo), GFP_KERNEL); arvo = kzalloc(sizeof(*arvo), GFP_KERNEL);
if (!arvo) { if (!arvo) {
dev_err(&hdev->dev, "can't alloc device descriptor\n"); hid_err(hdev, "can't alloc device descriptor\n");
return -ENOMEM; return -ENOMEM;
} }
hid_set_drvdata(hdev, arvo); hid_set_drvdata(hdev, arvo);
retval = arvo_init_arvo_device_struct(usb_dev, arvo); retval = arvo_init_arvo_device_struct(usb_dev, arvo);
if (retval) { if (retval) {
dev_err(&hdev->dev, hid_err(hdev, "couldn't init struct arvo_device\n");
"couldn't init struct arvo_device\n");
goto exit_free; goto exit_free;
} }
retval = roccat_connect(arvo_class, hdev); retval = roccat_connect(arvo_class, hdev);
if (retval < 0) { if (retval < 0) {
dev_err(&hdev->dev, "couldn't init char dev\n"); hid_err(hdev, "couldn't init char dev\n");
} else { } else {
arvo->chrdev_minor = retval; arvo->chrdev_minor = retval;
arvo->roccat_claimed = 1; arvo->roccat_claimed = 1;
...@@ -406,19 +405,19 @@ static int arvo_probe(struct hid_device *hdev, ...@@ -406,19 +405,19 @@ static int arvo_probe(struct hid_device *hdev,
retval = hid_parse(hdev); retval = hid_parse(hdev);
if (retval) { if (retval) {
dev_err(&hdev->dev, "parse failed\n"); hid_err(hdev, "parse failed\n");
goto exit; goto exit;
} }
retval = hid_hw_start(hdev, HID_CONNECT_DEFAULT); retval = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
if (retval) { if (retval) {
dev_err(&hdev->dev, "hw start failed\n"); hid_err(hdev, "hw start failed\n");
goto exit; goto exit;
} }
retval = arvo_init_specials(hdev); retval = arvo_init_specials(hdev);
if (retval) { if (retval) {
dev_err(&hdev->dev, "couldn't install keyboard\n"); hid_err(hdev, "couldn't install keyboard\n");
goto exit_stop; goto exit_stop;
} }
......
...@@ -116,7 +116,7 @@ static int koneplus_receive_control_status(struct usb_device *usb_dev) ...@@ -116,7 +116,7 @@ static int koneplus_receive_control_status(struct usb_device *usb_dev)
goto out; goto out;
} }
dev_err(&usb_dev->dev, "koneplus_receive_control_status: " hid_err(usb_dev, "koneplus_receive_control_status: "
"unknown response value 0x%x\n", control->value); "unknown response value 0x%x\n", control->value);
retval = -EINVAL; retval = -EINVAL;
goto out; goto out;
...@@ -658,21 +658,20 @@ static int koneplus_init_specials(struct hid_device *hdev) ...@@ -658,21 +658,20 @@ static int koneplus_init_specials(struct hid_device *hdev)
koneplus = kzalloc(sizeof(*koneplus), GFP_KERNEL); koneplus = kzalloc(sizeof(*koneplus), GFP_KERNEL);
if (!koneplus) { if (!koneplus) {
dev_err(&hdev->dev, "can't alloc device descriptor\n"); hid_err(hdev, "can't alloc device descriptor\n");
return -ENOMEM; return -ENOMEM;
} }
hid_set_drvdata(hdev, koneplus); hid_set_drvdata(hdev, koneplus);
retval = koneplus_init_koneplus_device_struct(usb_dev, koneplus); retval = koneplus_init_koneplus_device_struct(usb_dev, koneplus);
if (retval) { if (retval) {
dev_err(&hdev->dev, hid_err(hdev, "couldn't init struct koneplus_device\n");
"couldn't init struct koneplus_device\n");
goto exit_free; goto exit_free;
} }
retval = roccat_connect(koneplus_class, hdev); retval = roccat_connect(koneplus_class, hdev);
if (retval < 0) { if (retval < 0) {
dev_err(&hdev->dev, "couldn't init char dev\n"); hid_err(hdev, "couldn't init char dev\n");
} else { } else {
koneplus->chrdev_minor = retval; koneplus->chrdev_minor = retval;
koneplus->roccat_claimed = 1; koneplus->roccat_claimed = 1;
...@@ -708,19 +707,19 @@ static int koneplus_probe(struct hid_device *hdev, ...@@ -708,19 +707,19 @@ static int koneplus_probe(struct hid_device *hdev,
retval = hid_parse(hdev); retval = hid_parse(hdev);
if (retval) { if (retval) {
dev_err(&hdev->dev, "parse failed\n"); hid_err(hdev, "parse failed\n");
goto exit; goto exit;
} }
retval = hid_hw_start(hdev, HID_CONNECT_DEFAULT); retval = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
if (retval) { if (retval) {
dev_err(&hdev->dev, "hw start failed\n"); hid_err(hdev, "hw start failed\n");
goto exit; goto exit;
} }
retval = koneplus_init_specials(hdev); retval = koneplus_init_specials(hdev);
if (retval) { if (retval) {
dev_err(&hdev->dev, "couldn't install mouse\n"); hid_err(hdev, "couldn't install mouse\n");
goto exit_stop; goto exit_stop;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册