Commit 464aca16 authored by Enric Balletbo i Serra's avatar Enric Balletbo i Serra Committed by Sebastian Reichel

power: supply: cros_usbpd: Remove dev_err() getting the number of ports

When a device has no support to get the charger number of ports, it
doesn't have to result in a dev_err(), print saying "Could not get
charger port count" using a dev_info() would suffice. In such case,
the dev_info() message is already printed but the dev_err() is annoying,
specially, on those devices that doesn't support the command. So remove
the dev_err().
Signed-off-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: default avatarGuenter Roeck <groeck@chromium.org>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent a08990ea
...@@ -132,11 +132,8 @@ static int cros_usbpd_charger_get_num_ports(struct charger_data *charger) ...@@ -132,11 +132,8 @@ static int cros_usbpd_charger_get_num_ports(struct charger_data *charger)
ret = cros_usbpd_charger_ec_command(charger, 0, ret = cros_usbpd_charger_ec_command(charger, 0,
EC_CMD_CHARGE_PORT_COUNT, EC_CMD_CHARGE_PORT_COUNT,
NULL, 0, &resp, sizeof(resp)); NULL, 0, &resp, sizeof(resp));
if (ret < 0) { if (ret < 0)
dev_err(charger->dev,
"Unable to get the number of ports (err:0x%x)\n", ret);
return ret; return ret;
}
return resp.port_count; return resp.port_count;
} }
...@@ -148,11 +145,8 @@ static int cros_usbpd_charger_get_usbpd_num_ports(struct charger_data *charger) ...@@ -148,11 +145,8 @@ static int cros_usbpd_charger_get_usbpd_num_ports(struct charger_data *charger)
ret = cros_usbpd_charger_ec_command(charger, 0, EC_CMD_USB_PD_PORTS, ret = cros_usbpd_charger_ec_command(charger, 0, EC_CMD_USB_PD_PORTS,
NULL, 0, &resp, sizeof(resp)); NULL, 0, &resp, sizeof(resp));
if (ret < 0) { if (ret < 0)
dev_err(charger->dev,
"Unable to get the number or ports (err:0x%x)\n", ret);
return ret; return ret;
}
return resp.num_ports; return resp.num_ports;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment