libertas: make lbs_sync_channel() static
PATCH 1/1 libertas: make lbs_sync_channel() static
... by moving it into the file where it's sole user resides
Signed-off-by Holger Schurig <[email protected]>
drivers/net/wireless/libertas/assoc.c +0 -11
@@ -179,17 +179,6 @@ int lbs_update_channel(struct lbs_privatreturn ret; } -void lbs_sync_channel (struct work_struct *work) -{ - struct lbs_private *priv = container_of(work, struct lbs_private, - sync_channel); - -lbs_deb_enter (LBS_DEB_ASSOC ); -if (lbs_update_channel (priv)) -lbs_pr_info ("Channel synchronization failed." ); -lbs_deb_leave (LBS_DEB_ASSOC ); -} -static int assoc_helper_channel (struct lbs_private *priv,struct assoc_request * assoc_req) {
drivers/net/wireless/libertas/assoc.h +0 -1
@@ -7,6 +7,5 @@void lbs_association_worker (struct work_struct *work);struct assoc_request *lbs_get_association_request (struct lbs_private *priv); -void lbs_sync_channel (struct work_struct *work);#endif /* _LBS_ASSOC_H */
drivers/net/wireless/libertas/main.c +13 -1
@@ -985,6 +985,18 @@ out:lbs_deb_leave (LBS_DEB_CMD ); } +static void lbs_sync_channel_worker (struct work_struct *work) +{ + struct lbs_private *priv = container_of(work, struct lbs_private, + sync_channel); + +lbs_deb_enter (LBS_DEB_MAIN ); +if (lbs_update_channel (priv)) +lbs_pr_info ("Channel synchronization failed." ); +lbs_deb_leave (LBS_DEB_MAIN ); +} + +static int lbs_init_adapter (struct lbs_private *priv) {size_t bufsize;
@@ -1128,7 +1140,7 @@ struct lbs_private *lbs_add_card(void *c priv->work_thread =create_singlethread_workqueue ("lbs_worker" );INIT_DELAYED_WORK (&priv->assoc_work, lbs_association_worker);INIT_DELAYED_WORK (&priv->scan_work, lbs_scan_worker); -INIT_WORK (&priv->sync_channel, lbs_sync_channel); +INIT_WORK (&priv->sync_channel, lbs_sync_channel_worker);sprintf (priv->mesh_ssid,"mesh" ); priv->mesh_ssid_len =4 ;
Quoted 3 lines · Holger Schurig
... by moving it into the file where it's sole user resides
Signed-off-by Holger Schurig <[email protected]>
Acked-by Dan Williams <[email protected]>
Quoted 65 lines
Index:
wireless-2.6/drivers/net/wireless/libertas/assoc.c
===================================================================drivers/net/wireless/libertas/assoc.c +0
-11@@ -179,17 +179,6 @@ int lbs_update_channel(struct lbs_privatreturn ret; } -void lbs_sync_channel (struct work_struct *work) -{ - struct lbs_private *priv = container_of(work, struct lbs_private, - sync_channel); - -lbs_deb_enter (LBS_DEB_ASSOC ); -if (lbs_update_channel (priv)) -lbs_pr_info ("Channel synchronization failed." ); -lbs_deb_leave (LBS_DEB_ASSOC ); -} -static int assoc_helper_channel (struct lbs_private *priv,struct assoc_request * assoc_req) {Index:
wireless-2.6/drivers/net/wireless/libertas/assoc.h
===================================================================drivers/net/wireless/libertas/assoc.h +0
-1@@ -7,6 +7,5 @@void lbs_association_worker (struct work_struct *work);struct assoc_request *lbs_get_association_request (struct lbs_private *priv); -void lbs_sync_channel (struct work_struct *work);#endif /* _LBS_ASSOC_H */ Index:
wireless-2.6/drivers/net/wireless/libertas/main.c
===================================================================drivers/net/wireless/libertas/main.c +13
-1@@ -985,6 +985,18 @@ out:lbs_deb_leave (LBS_DEB_CMD ); } +static void lbs_sync_channel_worker (struct work_struct *work) +{ + struct lbs_private *priv = container_of(work, struct lbs_private, + sync_channel); + +lbs_deb_enter (LBS_DEB_MAIN ); +if (lbs_update_channel (priv)) +lbs_pr_info ("Channel synchronization failed." ); +lbs_deb_leave (LBS_DEB_MAIN ); +} + +static int lbs_init_adapter (struct lbs_private *priv) {size_t bufsize;@@ -1128,7 +1140,7 @@ struct lbs_private *lbs_add_card(void *c priv->work_thread =create_singlethread_workqueue ("lbs_worker" );INIT_DELAYED_WORK (&priv->assoc_work, lbs_association_worker);INIT_DELAYED_WORK (&priv->scan_work, lbs_scan_worker); -INIT_WORK (&priv->sync_channel, lbs_sync_channel); +INIT_WORK (&priv->sync_channel, lbs_sync_channel_worker);sprintf (priv->mesh_ssid,"mesh" ); priv->mesh_ssid_len =4 ;