Skip to content

Commit beb18bb

Browse files
basuamdJiri Kosina
authored andcommitted
HID: amd_sfh: Change dev_err to dev_dbg for additional debug info
Users should only be notified at most one time on systems doesn't have any sensors connected or non-supported systems. Check the return code and don't display error messages in those conditions. Signed-off-by: Basavaraj Natikar <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent a1f7642 commit beb18bb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,13 +286,13 @@ int amd_sfh1_1_init(struct amd_mp2_dev *mp2)
286286

287287
phy_base <<= 21;
288288
if (!devm_request_mem_region(dev, phy_base, 128 * 1024, "amd_sfh")) {
289-
dev_err(dev, "can't reserve mmio registers\n");
289+
dev_dbg(dev, "can't reserve mmio registers\n");
290290
return -ENOMEM;
291291
}
292292

293293
mp2->vsbase = devm_ioremap(dev, phy_base, 128 * 1024);
294294
if (!mp2->vsbase) {
295-
dev_err(dev, "failed to remap vsbase\n");
295+
dev_dbg(dev, "failed to remap vsbase\n");
296296
return -ENOMEM;
297297
}
298298

@@ -301,7 +301,7 @@ int amd_sfh1_1_init(struct amd_mp2_dev *mp2)
301301

302302
memcpy_fromio(&binfo, mp2->vsbase, sizeof(struct sfh_base_info));
303303
if (binfo.sbase.fw_info.fw_ver == 0 || binfo.sbase.s_list.sl.sensors == 0) {
304-
dev_err(dev, "failed to get sensors\n");
304+
dev_dbg(dev, "failed to get sensors\n");
305305
return -EOPNOTSUPP;
306306
}
307307
dev_dbg(dev, "firmware version 0x%x\n", binfo.sbase.fw_info.fw_ver);

0 commit comments

Comments
 (0)