Skip to content

Commit 577c04f

Browse files
Marek VasutKalle Valo
Marek Vasut
authored and
Kalle Valo
committed
wifi: wilc1000: Fold wilc_create_wiphy() into cfg80211.c
The wilc_create_wiphy() is not used outside of cfg80211.c . Make the function static and remove its entry from cfg80211.h Reviewed-by: Alexis Lothoré <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent 1241c56 commit 577c04f

File tree

2 files changed

+47
-48
lines changed

2 files changed

+47
-48
lines changed

drivers/net/wireless/microchip/wilc1000/cfg80211.c

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1757,53 +1757,7 @@ void wlan_deinit_locks(struct wilc *wilc)
17571757
cleanup_srcu_struct(&wilc->srcu);
17581758
}
17591759

1760-
int wilc_cfg80211_init(struct wilc **wilc, struct device *dev, int io_type,
1761-
const struct wilc_hif_func *ops)
1762-
{
1763-
struct wilc *wl;
1764-
int ret, i;
1765-
1766-
wl = wilc_create_wiphy(dev);
1767-
if (!wl)
1768-
return -EINVAL;
1769-
1770-
wlan_init_locks(wl);
1771-
1772-
ret = wilc_wlan_cfg_init(wl);
1773-
if (ret)
1774-
goto free_wl;
1775-
1776-
*wilc = wl;
1777-
wl->io_type = io_type;
1778-
wl->hif_func = ops;
1779-
1780-
for (i = 0; i < NQUEUES; i++)
1781-
INIT_LIST_HEAD(&wl->txq[i].txq_head.list);
1782-
1783-
INIT_LIST_HEAD(&wl->rxq_head.list);
1784-
INIT_LIST_HEAD(&wl->vif_list);
1785-
1786-
wl->hif_workqueue = alloc_ordered_workqueue("%s", WQ_MEM_RECLAIM,
1787-
wiphy_name(wl->wiphy));
1788-
if (!wl->hif_workqueue) {
1789-
ret = -ENOMEM;
1790-
goto free_cfg;
1791-
}
1792-
1793-
return 0;
1794-
1795-
free_cfg:
1796-
wilc_wlan_cfg_deinit(wl);
1797-
1798-
free_wl:
1799-
wlan_deinit_locks(wl);
1800-
wiphy_unregister(wl->wiphy);
1801-
wiphy_free(wl->wiphy);
1802-
return ret;
1803-
}
1804-
EXPORT_SYMBOL_GPL(wilc_cfg80211_init);
1805-
1806-
struct wilc *wilc_create_wiphy(struct device *dev)
1760+
static struct wilc *wilc_create_wiphy(struct device *dev)
18071761
{
18081762
struct wiphy *wiphy;
18091763
struct wilc *wl;
@@ -1861,6 +1815,52 @@ struct wilc *wilc_create_wiphy(struct device *dev)
18611815
return wl;
18621816
}
18631817

1818+
int wilc_cfg80211_init(struct wilc **wilc, struct device *dev, int io_type,
1819+
const struct wilc_hif_func *ops)
1820+
{
1821+
struct wilc *wl;
1822+
int ret, i;
1823+
1824+
wl = wilc_create_wiphy(dev);
1825+
if (!wl)
1826+
return -EINVAL;
1827+
1828+
wlan_init_locks(wl);
1829+
1830+
ret = wilc_wlan_cfg_init(wl);
1831+
if (ret)
1832+
goto free_wl;
1833+
1834+
*wilc = wl;
1835+
wl->io_type = io_type;
1836+
wl->hif_func = ops;
1837+
1838+
for (i = 0; i < NQUEUES; i++)
1839+
INIT_LIST_HEAD(&wl->txq[i].txq_head.list);
1840+
1841+
INIT_LIST_HEAD(&wl->rxq_head.list);
1842+
INIT_LIST_HEAD(&wl->vif_list);
1843+
1844+
wl->hif_workqueue = alloc_ordered_workqueue("%s", WQ_MEM_RECLAIM,
1845+
wiphy_name(wl->wiphy));
1846+
if (!wl->hif_workqueue) {
1847+
ret = -ENOMEM;
1848+
goto free_cfg;
1849+
}
1850+
1851+
return 0;
1852+
1853+
free_cfg:
1854+
wilc_wlan_cfg_deinit(wl);
1855+
1856+
free_wl:
1857+
wlan_deinit_locks(wl);
1858+
wiphy_unregister(wl->wiphy);
1859+
wiphy_free(wl->wiphy);
1860+
return ret;
1861+
}
1862+
EXPORT_SYMBOL_GPL(wilc_cfg80211_init);
1863+
18641864
int wilc_init_host_int(struct net_device *net)
18651865
{
18661866
int ret;

drivers/net/wireless/microchip/wilc1000/cfg80211.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
int wilc_cfg80211_init(struct wilc **wilc, struct device *dev, int io_type,
1212
const struct wilc_hif_func *ops);
13-
struct wilc *wilc_create_wiphy(struct device *dev);
1413
void wilc_deinit_host_int(struct net_device *net);
1514
int wilc_init_host_int(struct net_device *net);
1615
void wilc_wfi_monitor_rx(struct net_device *mon_dev, u8 *buff, u32 size);

0 commit comments

Comments
 (0)