rtlwifi: rtl818x: constify rtl_intf_ops structures
The rtl_intf_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
6fe813e3d5
commit
1bfcfdcca1
@ -2456,7 +2456,7 @@ int rtl_pci_resume(struct device *dev)
|
|||||||
EXPORT_SYMBOL(rtl_pci_resume);
|
EXPORT_SYMBOL(rtl_pci_resume);
|
||||||
#endif /* CONFIG_PM_SLEEP */
|
#endif /* CONFIG_PM_SLEEP */
|
||||||
|
|
||||||
struct rtl_intf_ops rtl_pci_ops = {
|
const struct rtl_intf_ops rtl_pci_ops = {
|
||||||
.read_efuse_byte = read_efuse_byte,
|
.read_efuse_byte = read_efuse_byte,
|
||||||
.adapter_start = rtl_pci_start,
|
.adapter_start = rtl_pci_start,
|
||||||
.adapter_stop = rtl_pci_stop,
|
.adapter_stop = rtl_pci_stop,
|
||||||
|
@ -286,7 +286,7 @@ struct rtl_pci_priv {
|
|||||||
|
|
||||||
int rtl_pci_reset_trx_ring(struct ieee80211_hw *hw);
|
int rtl_pci_reset_trx_ring(struct ieee80211_hw *hw);
|
||||||
|
|
||||||
extern struct rtl_intf_ops rtl_pci_ops;
|
extern const struct rtl_intf_ops rtl_pci_ops;
|
||||||
|
|
||||||
int rtl_pci_probe(struct pci_dev *pdev,
|
int rtl_pci_probe(struct pci_dev *pdev,
|
||||||
const struct pci_device_id *id);
|
const struct pci_device_id *id);
|
||||||
|
@ -1049,7 +1049,7 @@ static void rtl_fill_h2c_cmd_work_callback(struct work_struct *work)
|
|||||||
rtlpriv->cfg->ops->fill_h2c_cmd(hw, H2C_RA_MASK, 5, rtlpriv->rate_mask);
|
rtlpriv->cfg->ops->fill_h2c_cmd(hw, H2C_RA_MASK, 5, rtlpriv->rate_mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct rtl_intf_ops rtl_usb_ops = {
|
static const struct rtl_intf_ops rtl_usb_ops = {
|
||||||
.adapter_start = rtl_usb_start,
|
.adapter_start = rtl_usb_start,
|
||||||
.adapter_stop = rtl_usb_stop,
|
.adapter_stop = rtl_usb_stop,
|
||||||
.adapter_tx = rtl_usb_tx,
|
.adapter_tx = rtl_usb_tx,
|
||||||
|
@ -2593,7 +2593,7 @@ struct rtl_priv {
|
|||||||
*intf_ops : for diff interrface usb/pcie
|
*intf_ops : for diff interrface usb/pcie
|
||||||
*/
|
*/
|
||||||
struct rtl_hal_cfg *cfg;
|
struct rtl_hal_cfg *cfg;
|
||||||
struct rtl_intf_ops *intf_ops;
|
const struct rtl_intf_ops *intf_ops;
|
||||||
|
|
||||||
/*this var will be set by set_bit,
|
/*this var will be set by set_bit,
|
||||||
and was used to indicate status of
|
and was used to indicate status of
|
||||||
|
Loading…
Reference in New Issue
Block a user