X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fadc%2Fsandbox.c;h=1f32289f60366826be2856ae11f0bd7a23b610e8;hb=7c45862f22fd6275a48130197d315dcf8723cfb5;hp=371892237aa429d293d31133c3e4e6a67543d4d9;hpb=ed02c532be690b3d0c3e15c81531785a788fd949;p=u-boot
diff --git a/drivers/adc/sandbox.c b/drivers/adc/sandbox.c
index 371892237a..1f32289f60 100644
--- a/drivers/adc/sandbox.c
+++ b/drivers/adc/sandbox.c
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2015 Samsung Electronics
* Przemyslaw Marczak
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include
#include
@@ -61,7 +60,7 @@ int sandbox_adc_channel_data(struct udevice *dev, int channel,
/* For single-channel conversion mode, check if channel was selected */
if ((priv->conversion_mode == SANDBOX_ADC_MODE_SINGLE_CHANNEL) &&
!(priv->active_channel_mask & (1 << channel))) {
- error("Request for an inactive channel!");
+ pr_err("Request for an inactive channel!");
return -EINVAL;
}
@@ -82,12 +81,12 @@ int sandbox_adc_channels_data(struct udevice *dev, unsigned int channel_mask,
/* Return error for single-channel conversion mode */
if (priv->conversion_mode == SANDBOX_ADC_MODE_SINGLE_CHANNEL) {
- error("ADC in single-channel mode!");
+ pr_err("ADC in single-channel mode!");
return -EPERM;
}
/* Check channel selection */
if (!(priv->active_channel_mask & channel_mask)) {
- error("Request for an inactive channel!");
+ pr_err("Request for an inactive channel!");
return -EINVAL;
}
/* The conversion must be started before reading the data */