Commit f0966581 authored by David S. Miller's avatar David S. Miller
Browse files

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: default avatarDavid S. Miller <davem@davemloft.net>
parents d6fc1923 31ffcb10
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -167,7 +167,7 @@ static void qca_tty_wakeup(struct serdev_device *serdev)
	schedule_work(&qca->tx_work);
}

static struct serdev_device_ops qca_serdev_ops = {
static const struct serdev_device_ops qca_serdev_ops = {
	.receive_buf = qca_tty_receive,
	.write_wakeup = qca_tty_wakeup,
};
+1 −1
Original line number Diff line number Diff line
@@ -162,7 +162,7 @@ static int ravb_get_mdio_data(struct mdiobb_ctrl *ctrl)
}

/* MDIO bus control struct */
static struct mdiobb_ops bb_ops = {
static const struct mdiobb_ops bb_ops = {
	.owner = THIS_MODULE,
	.set_mdc = ravb_set_mdc,
	.set_mdio_dir = ravb_set_mdio_dir,
+1 −1
Original line number Diff line number Diff line
@@ -1202,7 +1202,7 @@ static void sh_mdc_ctrl(struct mdiobb_ctrl *ctrl, int bit)
}

/* mdio bus control struct */
static struct mdiobb_ops bb_ops = {
static const struct mdiobb_ops bb_ops = {
	.owner = THIS_MODULE,
	.set_mdc = sh_mdc_ctrl,
	.set_mdio_dir = sh_mmd_ctrl,
+2 −2
Original line number Diff line number Diff line
@@ -343,7 +343,7 @@ static int at803x_rgmii_reg_get_voltage_sel(struct regulator_dev *rdev)
	return (val & AT803X_DEBUG_RGMII_1V8) ? 1 : 0;
}

static struct regulator_ops vddio_regulator_ops = {
static const struct regulator_ops vddio_regulator_ops = {
	.list_voltage = regulator_list_voltage_table,
	.set_voltage_sel = at803x_rgmii_reg_set_voltage_sel,
	.get_voltage_sel = at803x_rgmii_reg_get_voltage_sel,
@@ -364,7 +364,7 @@ static const struct regulator_desc vddio_desc = {
	.owner = THIS_MODULE,
};

static struct regulator_ops vddh_regulator_ops = {
static const struct regulator_ops vddh_regulator_ops = {
};

static const struct regulator_desc vddh_desc = {
+1 −1
Original line number Diff line number Diff line
@@ -958,7 +958,7 @@ static int vsc8584_macsec_del_txsa(struct macsec_context *ctx)
	return 0;
}

static struct macsec_ops vsc8584_macsec_ops = {
static const struct macsec_ops vsc8584_macsec_ops = {
	.mdo_dev_open = vsc8584_macsec_dev_open,
	.mdo_dev_stop = vsc8584_macsec_dev_stop,
	.mdo_add_secy = vsc8584_macsec_add_secy,
Loading