From: Pavan Savoy Date: Wed, 14 Jul 2010 13:21:12 +0000 (-0500) Subject: Staging: ti-st: make use of linux err codes X-Git-Tag: v2.6.36-rc1~520^2~1^2~122 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=320920cba355146258da7de80bed0069c1dff24a;p=pandora-kernel.git Staging: ti-st: make use of linux err codes remove custom error code definitions from the header and make use of the agreed upon linux error codes. Signed-off-by: Pavan Savoy Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/ti-st/bt_drv.c b/drivers/staging/ti-st/bt_drv.c index d8420b5c91fa..d70aea168915 100644 --- a/drivers/staging/ti-st/bt_drv.c +++ b/drivers/staging/ti-st/bt_drv.c @@ -191,7 +191,7 @@ static int hci_st_open(struct hci_dev *hdev) /* Register with ST layer */ err = st_register(&hci_st_proto); - if (err == ST_ERR_PENDING) { + if (err == -EINPROGRESS) { /* Prepare wait-for-completion handler data structures. * Needed to syncronize this and st_registration_completion_cb() * functions. @@ -232,7 +232,7 @@ static int hci_st_open(struct hci_dev *hdev) return -EAGAIN; } err = 0; - } else if (err == ST_ERR_FAILURE) { + } else if (err == -1) { BT_DRV_ERR("st_register failed %d", err); BTDRV_API_EXIT(-EAGAIN); return -EAGAIN; @@ -280,7 +280,7 @@ static int hci_st_close(struct hci_dev *hdev) /* Unregister from ST layer */ if (test_and_clear_bit(BT_ST_REGISTERED, &hst->flags)) { err = st_unregister(ST_BT); - if (err != ST_SUCCESS) { + if (err != 0) { BT_DRV_ERR("st_unregister failed %d", err); BTDRV_API_EXIT(-EBUSY); return -EBUSY; diff --git a/drivers/staging/ti-st/st.h b/drivers/staging/ti-st/st.h index e6a8ffde30af..c4288aa8d2bd 100644 --- a/drivers/staging/ti-st/st.h +++ b/drivers/staging/ti-st/st.h @@ -50,15 +50,6 @@ enum proto_type { ST_MAX, }; -enum { - ST_ERR_FAILURE = -1, /* check struct */ - ST_SUCCESS, - ST_ERR_PENDING = -5, /* to call reg_complete_cb */ - ST_ERR_ALREADY, /* already registered */ - ST_ERR_INPROGRESS, - ST_ERR_NOPROTO, /* protocol not supported */ -}; - /* per protocol structure * for BT/FM and GPS */ Reading git-diff-tree failed