summaryrefslogtreecommitdiffstats
path: root/drivers/staging/brcm80211/util/bcmotp.c
diff options
context:
space:
mode:
authorRoland Vossen <rvossen@broadcom.com>2011-05-03 11:35:20 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2011-05-03 12:42:34 -0700
commitb74ac12ecdc23cfc4b13c71f9a2356f51d15c7e8 (patch)
treeb9b8da0db861c477e21ee9c5f32cc0cfba7853b7 /drivers/staging/brcm80211/util/bcmotp.c
parente10d82d47dc4fe1d98ab46337324a2f7facc0491 (diff)
downloadop-kernel-dev-b74ac12ecdc23cfc4b13c71f9a2356f51d15c7e8.zip
op-kernel-dev-b74ac12ecdc23cfc4b13c71f9a2356f51d15c7e8.tar.gz
staging: brcm80211: replace error codes part 2
Replacing part of the proprietary error code values with native error code values. Cc: devel@linuxdriverproject.org Cc: linux-wireless@vger.kernel.org Cc: Brett Rudley <brudley@broadcom.com> Cc: Henry Ptasinski <henryp@broadcom.com> Cc: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/brcm80211/util/bcmotp.c')
-rw-r--r--drivers/staging/brcm80211/util/bcmotp.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/staging/brcm80211/util/bcmotp.c b/drivers/staging/brcm80211/util/bcmotp.c
index 8907841..c4a252e 100644
--- a/drivers/staging/brcm80211/util/bcmotp.c
+++ b/drivers/staging/brcm80211/util/bcmotp.c
@@ -384,7 +384,7 @@ static int ipxotp_read_region(void *oh, int region, u16 *data, uint *wlen)
sz = (uint) oi->hwlim - oi->hwbase;
if (!(oi->status & OTPS_GUP_HW)) {
*wlen = sz;
- return -BCME_NOTFOUND;
+ return -ENODATA;
}
if (*wlen < sz) {
*wlen = sz;
@@ -396,7 +396,7 @@ static int ipxotp_read_region(void *oh, int region, u16 *data, uint *wlen)
sz = ((uint) oi->swlim - oi->swbase);
if (!(oi->status & OTPS_GUP_SW)) {
*wlen = sz;
- return -BCME_NOTFOUND;
+ return -ENODATA;
}
if (*wlen < sz) {
*wlen = sz;
@@ -408,7 +408,7 @@ static int ipxotp_read_region(void *oh, int region, u16 *data, uint *wlen)
sz = OTPGU_CI_SZ;
if (!(oi->status & OTPS_GUP_CI)) {
*wlen = sz;
- return -BCME_NOTFOUND;
+ return -ENODATA;
}
if (*wlen < sz) {
*wlen = sz;
@@ -420,7 +420,7 @@ static int ipxotp_read_region(void *oh, int region, u16 *data, uint *wlen)
sz = (uint) oi->flim - oi->fbase;
if (!(oi->status & OTPS_GUP_FUSE)) {
*wlen = sz;
- return -BCME_NOTFOUND;
+ return -ENODATA;
}
if (*wlen < sz) {
*wlen = sz;
@@ -432,7 +432,7 @@ static int ipxotp_read_region(void *oh, int region, u16 *data, uint *wlen)
sz = ((uint) oi->flim - oi->hwbase);
if (!(oi->status & (OTPS_GUP_HW | OTPS_GUP_SW))) {
*wlen = sz;
- return -BCME_NOTFOUND;
+ return -ENODATA;
}
if (*wlen < sz) {
*wlen = sz;
@@ -708,7 +708,7 @@ static int hndotp_read_region(void *oh, int region, u16 *data, uint *wlen)
/* Region empty? */
st = oi->hwprot | oi->signvalid;
if ((st & region) == 0)
- return -BCME_NOTFOUND;
+ return -ENODATA;
*wlen =
((int)*wlen < oi->boundary / 2) ? *wlen : (uint) oi->boundary / 2;
@@ -926,13 +926,13 @@ otp_read_region(si_t *sih, int region, u16 *data,
si_otp_power(sih, true);
if (!si_is_otp_powered(sih) || si_is_otp_disabled(sih)) {
- err = -BCME_NOTREADY;
+ err = -EPERM;
goto out;
}
oh = otp_init(sih);
if (oh == NULL) {
- err = -BCME_ERROR;
+ err = -EBADE;
goto out;
}
OpenPOWER on IntegriCloud