From: Johan Hovold Date: Fri, 27 Mar 2015 11:45:44 +0000 (+0100) Subject: greybus: hid: replace pr_err with dev_err X-Git-Tag: v4.9-rc1~119^2~378^2~21^2~1631 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b67f2d13db21de2fc948d6f7090fe2b9bae5d5bd;p=karo-tx-linux.git greybus: hid: replace pr_err with dev_err Replace pr_err with dev_err and clean up error messages somewhat. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/hid.c b/drivers/staging/greybus/hid.c index fe05a08aa7f2..9734c7b35cc2 100644 --- a/drivers/staging/greybus/hid.c +++ b/drivers/staging/greybus/hid.c @@ -139,10 +139,12 @@ static int gb_hid_set_report(struct gb_hid *ghid, u8 report_type, u8 report_id, memcpy(request->report, buf, len); ret = gb_operation_request_send_sync(operation); - if (ret) - pr_err("%s: operation failed (%d)\n", __func__, ret); - else + if (ret) { + dev_err(&operation->connection->dev, + "failed to set report: %d\n", ret); + } else { ret = len; + } gb_operation_destroy(operation); return ret; @@ -156,18 +158,21 @@ static void gb_hid_irq_handler(u8 type, struct gb_operation *op) int ret, size; if (type != GB_HID_TYPE_IRQ_EVENT) { - pr_err("unsupported unsolicited request\n"); + dev_err(&connection->dev, + "unsupported unsolicited request\n"); return; } ret = gb_operation_response_send(op, 0); - if (ret) - pr_err("%s: error %d sending response status %d\n", __func__, - ret, 0); + if (ret) { + dev_err(&connection->dev, + "failed to send response status %d: %d\n", + 0, ret); + } size = request->report[0] | request->report[1] << 8; if (!size) { - pr_err("%s: size can't be zero.\n", __func__); + dev_err(&connection->dev, "bad report size: %d\n", size); return; }