Replace macro container_of_work_rsl with standard macro container_of to
increase readability.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
V1->V2: Changed subject line to be without “f.”
Changed description from function to macro
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 9 +++------
drivers/staging/rtl8192e/rtl8192e/rtl_ps.c | 3 +--
drivers/staging/rtl8192e/rtllib.h | 1 -
drivers/staging/rtl8192e/rtllib_softmac.c | 2 +-
drivers/staging/rtl8192e/rtllib_softmac_wx.c | 3 +--
5 files changed, 6 insertions(+), 12 deletions(-)
@@ -311,8 +311,7 @@ static const struct rtllib_qos_parameters def_qos_parameters = {
static void _rtl92e_update_beacon(void *data)
{
- struct r8192_priv *priv = container_of_work_rsl(data, struct r8192_priv,
- update_beacon_wq.work);
+ struct r8192_priv *priv = container_of(data, struct r8192_priv, update_beacon_wq.work);
struct net_device *dev = priv->rtllib->dev;
struct rtllib_device *ieee = priv->rtllib;
struct rtllib_network *net = &ieee->current_network;
@@ -326,8 +325,7 @@ static void _rtl92e_update_beacon(void *data)
static void _rtl92e_qos_activate(void *data)
{
- struct r8192_priv *priv = container_of_work_rsl(data, struct r8192_priv,
- qos_activate);
+ struct r8192_priv *priv = container_of(data, struct r8192_priv, qos_activate);
struct net_device *dev = priv->rtllib->dev;
int i;
@@ -2033,8 +2031,7 @@ void rtl92e_commit(struct net_device *dev)
static void _rtl92e_restart(void *data)
{
- struct r8192_priv *priv = container_of_work_rsl(data, struct r8192_priv,
- reset_wq);
+ struct r8192_priv *priv = container_of(data, struct r8192_priv, reset_wq);
struct net_device *dev = priv->rtllib->dev;
mutex_lock(&priv->wx_mutex);
@@ -142,8 +142,7 @@ void rtl92e_ips_leave(struct net_device *dev)
void rtl92e_ips_leave_wq(void *data)
{
- struct rtllib_device *ieee = container_of_work_rsl(data,
- struct rtllib_device, ips_leave_wq);
+ struct rtllib_device *ieee = container_of(data, struct rtllib_device, ips_leave_wq);
struct net_device *dev = ieee->dev;
struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev);
@@ -62,7 +62,6 @@
#define IW_CUSTOM_MAX 256 /* In bytes */
#endif
-#define container_of_work_rsl(x, y, z) container_of(x, y, z)
#define container_of_dwork_rsl(x, y, z) \
container_of(to_delayed_work(x), y, z)
@@ -1498,7 +1498,7 @@ static void rtllib_associate_step2(struct rtllib_device *ieee)
static void rtllib_associate_complete_wq(void *data)
{
struct rtllib_device *ieee = (struct rtllib_device *)
- container_of_work_rsl(data,
+ container_of(data,
struct rtllib_device,
associate_complete_wq);
struct rt_pwr_save_ctrl *psc = &ieee->pwr_save_ctrl;
@@ -326,8 +326,7 @@ EXPORT_SYMBOL(rtllib_wx_set_mode);
void rtllib_wx_sync_scan_wq(void *data)
{
- struct rtllib_device *ieee = container_of_work_rsl(data,
- struct rtllib_device, wx_sync_scan_wq);
+ struct rtllib_device *ieee = container_of(data, struct rtllib_device, wx_sync_scan_wq);
short chan;
enum ht_extchnl_offset chan_offset = 0;
enum ht_channel_width bandwidth = 0;