Skip to content

Commit f096658

Browse files
committed
Merge branch 'drivers-net-constify-static-ops-variables'
Rikard Falkeborn says: ==================== drivers/net: constify static ops-variables This series constifies a number of static ops variables, to allow the compiler to put them in read-only memory. Compile-tested only. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents d6fc192 + 31ffcb1 commit f096658

6 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎drivers/net/ethernet/qualcomm/qca_uart.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ static void qca_tty_wakeup(struct serdev_device *serdev)
167167
schedule_work(&qca->tx_work);
168168
}
169169

170-
static struct serdev_device_ops qca_serdev_ops = {
170+
static const struct serdev_device_ops qca_serdev_ops = {
171171
.receive_buf = qca_tty_receive,
172172
.write_wakeup = qca_tty_wakeup,
173173
};

‎drivers/net/ethernet/renesas/ravb_main.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ static int ravb_get_mdio_data(struct mdiobb_ctrl *ctrl)
162162
}
163163

164164
/* MDIO bus control struct */
165-
static struct mdiobb_ops bb_ops = {
165+
static const struct mdiobb_ops bb_ops = {
166166
.owner = THIS_MODULE,
167167
.set_mdc = ravb_set_mdc,
168168
.set_mdio_dir = ravb_set_mdio_dir,

‎drivers/net/ethernet/renesas/sh_eth.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,7 @@ static void sh_mdc_ctrl(struct mdiobb_ctrl *ctrl, int bit)
12021202
}
12031203

12041204
/* mdio bus control struct */
1205-
static struct mdiobb_ops bb_ops = {
1205+
static const struct mdiobb_ops bb_ops = {
12061206
.owner = THIS_MODULE,
12071207
.set_mdc = sh_mdc_ctrl,
12081208
.set_mdio_dir = sh_mmd_ctrl,

‎drivers/net/phy/at803x.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ static int at803x_rgmii_reg_get_voltage_sel(struct regulator_dev *rdev)
343343
return (val & AT803X_DEBUG_RGMII_1V8) ? 1 : 0;
344344
}
345345

346-
static struct regulator_ops vddio_regulator_ops = {
346+
static const struct regulator_ops vddio_regulator_ops = {
347347
.list_voltage = regulator_list_voltage_table,
348348
.set_voltage_sel = at803x_rgmii_reg_set_voltage_sel,
349349
.get_voltage_sel = at803x_rgmii_reg_get_voltage_sel,
@@ -364,7 +364,7 @@ static const struct regulator_desc vddio_desc = {
364364
.owner = THIS_MODULE,
365365
};
366366

367-
static struct regulator_ops vddh_regulator_ops = {
367+
static const struct regulator_ops vddh_regulator_ops = {
368368
};
369369

370370
static const struct regulator_desc vddh_desc = {

‎drivers/net/phy/mscc/mscc_macsec.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,7 @@ static int vsc8584_macsec_del_txsa(struct macsec_context *ctx)
958958
return 0;
959959
}
960960

961-
static struct macsec_ops vsc8584_macsec_ops = {
961+
static const struct macsec_ops vsc8584_macsec_ops = {
962962
.mdo_dev_open = vsc8584_macsec_dev_open,
963963
.mdo_dev_stop = vsc8584_macsec_dev_stop,
964964
.mdo_add_secy = vsc8584_macsec_add_secy,

‎drivers/net/wireless/ath/ath11k/thermal.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ ath11k_thermal_set_cur_throttle_state(struct thermal_cooling_device *cdev,
5353
return ret;
5454
}
5555

56-
static struct thermal_cooling_device_ops ath11k_thermal_ops = {
56+
static const struct thermal_cooling_device_ops ath11k_thermal_ops = {
5757
.get_max_state = ath11k_thermal_get_max_throttle_state,
5858
.get_cur_state = ath11k_thermal_get_cur_throttle_state,
5959
.set_cur_state = ath11k_thermal_set_cur_throttle_state,

0 commit comments

Comments
 (0)