From 896774f631d8377a674fd2b79097b57bab297c16 Mon Sep 17 00:00:00 2001 From: Bhumika Goyal Date: Wed, 17 Feb 2016 22:20:09 +0530 Subject: [PATCH] Staging: wlan-ng: Remove unused functions and prototypes hfa384x_drvr_getconfig_async is not used anywhere in the kernel so remove it. Also remove its prototype from the header file. Also the function hfa384x_cb_rrid was only used by hfa384x_drvr_getconfig_async so remove its definition and prototype as well. Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/hfa384x.h | 4 -- drivers/staging/wlan-ng/hfa384x_usb.c | 74 --------------------------- 2 files changed, 78 deletions(-) diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h index 4fd3145456a1..cec6d0ba3b65 100644 --- a/drivers/staging/wlan-ng/hfa384x.h +++ b/drivers/staging/wlan-ng/hfa384x.h @@ -1389,10 +1389,6 @@ static inline int hfa384x_drvr_setconfig16(hfa384x_t *hw, u16 rid, u16 val) return hfa384x_drvr_setconfig(hw, rid, &value, sizeof(value)); } -int -hfa384x_drvr_getconfig_async(hfa384x_t *hw, - u16 rid, ctlx_usercb_t usercb, void *usercb_data); - int hfa384x_drvr_setconfig_async(hfa384x_t *hw, u16 rid, diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index 5271d42be623..09b4b2cfc97d 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -213,8 +213,6 @@ unlocked_usbctlx_cancel_async(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx); static void hfa384x_cb_status(hfa384x_t *hw, const hfa384x_usbctlx_t *ctlx); -static void hfa384x_cb_rrid(hfa384x_t *hw, const hfa384x_usbctlx_t *ctlx); - static int usbctlx_get_status(const hfa384x_usb_cmdresp_t *cmdresp, hfa384x_cmdresult_t *result); @@ -816,43 +814,6 @@ static void hfa384x_cb_status(hfa384x_t *hw, const hfa384x_usbctlx_t *ctlx) } } -/*---------------------------------------------------------------- -* hfa384x_cb_rrid -* -* CTLX completion handler for async RRID type control exchanges. -* -* Note: If the handling is changed here, it should probably be -* changed in dorrid as well. -* -* Arguments: -* hw hw struct -* ctlx completed CTLX -* -* Returns: -* nothing -* -* Side effects: -* -* Call context: -* interrupt -----------------------------------------------------------------*/ -static void hfa384x_cb_rrid(hfa384x_t *hw, const hfa384x_usbctlx_t *ctlx) -{ - if (ctlx->usercb != NULL) { - hfa384x_rridresult_t rridresult; - - if (ctlx->state != CTLX_COMPLETE) { - memset(&rridresult, 0, sizeof(rridresult)); - rridresult.rid = le16_to_cpu(ctlx->outbuf.rridreq.rid); - } else { - usbctlx_get_rridresult(&ctlx->inbuf.rridresp, - &rridresult); - } - - ctlx->usercb(hw, &rridresult, ctlx->usercb_data); - } -} - static inline int hfa384x_docmd_wait(hfa384x_t *hw, hfa384x_metacmd_t *cmd) { return hfa384x_docmd(hw, DOWAIT, cmd, NULL, NULL, NULL); @@ -2078,41 +2039,6 @@ int hfa384x_drvr_getconfig(hfa384x_t *hw, u16 rid, void *buf, u16 len) return hfa384x_dorrid_wait(hw, rid, buf, len); } -/*---------------------------------------------------------------- - * hfa384x_drvr_getconfig_async - * - * Performs the sequence necessary to perform an async read of - * of a config/info item. - * - * Arguments: - * hw device structure - * rid config/info record id (host order) - * buf host side record buffer. Upon return it will - * contain the body portion of the record (minus the - * RID and len). - * len buffer length (in bytes, should match record length) - * cbfn caller supplied callback, called when the command - * is done (successful or not). - * cbfndata pointer to some caller supplied data that will be - * passed in as an argument to the cbfn. - * - * Returns: - * nothing the cbfn gets a status argument identifying if - * any errors occur. - * Side effects: - * Queues an hfa384x_usbcmd_t for subsequent execution. - * - * Call context: - * Any - ----------------------------------------------------------------*/ -int -hfa384x_drvr_getconfig_async(hfa384x_t *hw, - u16 rid, ctlx_usercb_t usercb, void *usercb_data) -{ - return hfa384x_dorrid_async(hw, rid, NULL, 0, - hfa384x_cb_rrid, usercb, usercb_data); -} - /*---------------------------------------------------------------- * hfa384x_drvr_setconfig_async * -- 2.39.5