mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
Merge branch 'staticize-constify-drivers' into next
This brings in a number of patches from Marek Vasut to clean up cases tree-wide where a struct should be marked as static and const (in some cases only one of these was needed, but the majority are both).
This commit is contained in:
@@ -960,7 +960,7 @@ static int sata_fsl_scan(struct udevice *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct ahci_ops sata_fsl_ahci_ops = {
|
||||
static const struct ahci_ops sata_fsl_ahci_ops = {
|
||||
.scan = sata_fsl_scan,
|
||||
};
|
||||
|
||||
|
||||
@@ -1122,7 +1122,7 @@ static const struct udevice_id sata_mv_ids[] = {
|
||||
{ }
|
||||
};
|
||||
|
||||
struct ahci_ops sata_mv_ahci_ops = {
|
||||
static const struct ahci_ops sata_mv_ahci_ops = {
|
||||
.scan = sata_mv_scan,
|
||||
};
|
||||
|
||||
|
||||
@@ -935,7 +935,7 @@ int rkmtd_detach_mtd(struct udevice *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct rkmtd_ops rkmtd_ops = {
|
||||
static const struct rkmtd_ops rkmtd_ops = {
|
||||
.attach_mtd = rkmtd_attach_mtd,
|
||||
.detach_mtd = rkmtd_detach_mtd,
|
||||
};
|
||||
|
||||
@@ -534,7 +534,7 @@ static int ast2500_clk_enable(struct clk *clk)
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct clk_ops ast2500_clk_ops = {
|
||||
static const struct clk_ops ast2500_clk_ops = {
|
||||
.get_rate = ast2500_clk_get_rate,
|
||||
.set_rate = ast2500_clk_set_rate,
|
||||
.enable = ast2500_clk_enable,
|
||||
|
||||
@@ -1161,7 +1161,7 @@ static void ast2600_clk_dump(struct udevice *dev)
|
||||
}
|
||||
#endif
|
||||
|
||||
struct clk_ops ast2600_clk_ops = {
|
||||
static const struct clk_ops ast2600_clk_ops = {
|
||||
.get_rate = ast2600_clk_get_rate,
|
||||
.set_rate = ast2600_clk_set_rate,
|
||||
.enable = ast2600_clk_enable,
|
||||
|
||||
@@ -64,7 +64,7 @@ static int sunxi_clk_disable(struct clk *clk)
|
||||
return sunxi_set_gate(clk, false);
|
||||
}
|
||||
|
||||
struct clk_ops sunxi_clk_ops = {
|
||||
static const struct clk_ops sunxi_clk_ops = {
|
||||
.enable = sunxi_clk_enable,
|
||||
.disable = sunxi_clk_disable,
|
||||
};
|
||||
|
||||
@@ -124,7 +124,7 @@ int armv8_cpu_fill_madt(const struct udevice *dev, struct acpi_ctx *ctx)
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct acpi_ops armv8_cpu_acpi_ops = {
|
||||
static struct acpi_ops armv8_cpu_acpi_ops = {
|
||||
.fill_ssdt = armv8_cpu_fill_ssdt,
|
||||
.fill_madt = armv8_cpu_fill_madt,
|
||||
};
|
||||
|
||||
@@ -59,7 +59,7 @@ static int apple_mbox_recv(struct mbox_chan *chan, void *data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct mbox_ops apple_mbox_ops = {
|
||||
static const struct mbox_ops apple_mbox_ops = {
|
||||
.of_xlate = apple_mbox_of_xlate,
|
||||
.send = apple_mbox_send,
|
||||
.recv = apple_mbox_recv,
|
||||
|
||||
@@ -387,7 +387,7 @@ int imx_mu_of_xlate(struct mbox_chan *chan, struct ofnode_phandle_args *args)
|
||||
return plat->dcfg->of_xlate(chan, args);
|
||||
}
|
||||
|
||||
struct mbox_ops imx_mu_ops = {
|
||||
static const struct mbox_ops imx_mu_ops = {
|
||||
.of_xlate = imx_mu_of_xlate,
|
||||
.request = imx_mu_chan_request,
|
||||
.rfree = imx_mu_chan_free,
|
||||
|
||||
@@ -293,7 +293,7 @@ static int k3_sec_proxy_recv(struct mbox_chan *chan, void *data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct mbox_ops k3_sec_proxy_mbox_ops = {
|
||||
static const struct mbox_ops k3_sec_proxy_mbox_ops = {
|
||||
.of_xlate = k3_sec_proxy_of_xlate,
|
||||
.request = k3_sec_proxy_request,
|
||||
.rfree = k3_sec_proxy_free,
|
||||
|
||||
@@ -29,7 +29,7 @@ static int mfis_send(struct mbox_chan *chan, const void *data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct mbox_ops mfis_mbox_ops = {
|
||||
static const struct mbox_ops mfis_mbox_ops = {
|
||||
.send = mfis_send,
|
||||
};
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ static const struct udevice_id sandbox_mbox_ids[] = {
|
||||
{ }
|
||||
};
|
||||
|
||||
struct mbox_ops sandbox_mbox_mbox_ops = {
|
||||
static const struct mbox_ops sandbox_mbox_mbox_ops = {
|
||||
.request = sandbox_mbox_request,
|
||||
.rfree = sandbox_mbox_free,
|
||||
.send = sandbox_mbox_send,
|
||||
|
||||
@@ -147,7 +147,7 @@ static const struct udevice_id stm32_ipcc_ids[] = {
|
||||
{ }
|
||||
};
|
||||
|
||||
struct mbox_ops stm32_ipcc_mbox_ops = {
|
||||
static const struct mbox_ops stm32_ipcc_mbox_ops = {
|
||||
.request = stm32_ipcc_request,
|
||||
.rfree = stm32_ipcc_free,
|
||||
.send = stm32_ipcc_send,
|
||||
|
||||
@@ -726,7 +726,7 @@ int cros_ec_probe(struct udevice *dev)
|
||||
return cros_ec_register(dev);
|
||||
}
|
||||
|
||||
struct dm_cros_ec_ops cros_ec_ops = {
|
||||
static const struct dm_cros_ec_ops cros_ec_ops = {
|
||||
.packet = cros_ec_sandbox_packet,
|
||||
.get_switches = cros_ec_sandbox_get_switches,
|
||||
};
|
||||
|
||||
@@ -144,7 +144,7 @@ static int sandbox_i2c_eeprom_xfer(struct udevice *emul, struct i2c_msg *msg,
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct dm_i2c_ops sandbox_i2c_emul_ops = {
|
||||
static const struct dm_i2c_ops sandbox_i2c_emul_ops = {
|
||||
.xfer = sandbox_i2c_eeprom_xfer,
|
||||
};
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ UCLASS_DRIVER(qfw) = {
|
||||
.per_device_auto = sizeof(struct qfw_dev),
|
||||
};
|
||||
|
||||
struct bootdev_ops qfw_bootdev_ops = {
|
||||
static const struct bootdev_ops qfw_bootdev_ops = {
|
||||
.get_bootflow = qfw_get_bootflow,
|
||||
};
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ static int sf_bootdev_bind(struct udevice *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct bootdev_ops sf_bootdev_ops = {
|
||||
static const struct bootdev_ops sf_bootdev_ops = {
|
||||
.get_bootflow = sf_get_bootflow,
|
||||
};
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ static const struct udevice_id ast2500_reset_ids[] = {
|
||||
{ }
|
||||
};
|
||||
|
||||
struct reset_ops ast2500_reset_ops = {
|
||||
static const struct reset_ops ast2500_reset_ops = {
|
||||
.rst_assert = ast2500_reset_assert,
|
||||
.rst_deassert = ast2500_reset_deassert,
|
||||
.rst_status = ast2500_reset_status,
|
||||
|
||||
@@ -90,7 +90,7 @@ static const struct udevice_id ast2600_reset_ids[] = {
|
||||
{ }
|
||||
};
|
||||
|
||||
struct reset_ops ast2600_reset_ops = {
|
||||
static const struct reset_ops ast2600_reset_ops = {
|
||||
.rst_assert = ast2600_reset_assert,
|
||||
.rst_deassert = ast2600_reset_deassert,
|
||||
.rst_status = ast2600_reset_status,
|
||||
|
||||
@@ -79,7 +79,7 @@ static int at91_rst_deassert(struct reset_ctl *reset_ctl)
|
||||
return at91_rst_update(reset, reset_ctl->id, false);
|
||||
}
|
||||
|
||||
struct reset_ops at91_reset_ops = {
|
||||
static const struct reset_ops at91_reset_ops = {
|
||||
.of_xlate = at91_reset_of_xlate,
|
||||
.rst_assert = at91_rst_assert,
|
||||
.rst_deassert = at91_rst_deassert,
|
||||
|
||||
@@ -49,7 +49,7 @@ static int bcm6345_reset_request(struct reset_ctl *rst)
|
||||
return bcm6345_reset_assert(rst);
|
||||
}
|
||||
|
||||
struct reset_ops bcm6345_reset_reset_ops = {
|
||||
static const struct reset_ops bcm6345_reset_reset_ops = {
|
||||
.request = bcm6345_reset_request,
|
||||
.rst_assert = bcm6345_reset_assert,
|
||||
.rst_deassert = bcm6345_reset_deassert,
|
||||
|
||||
@@ -51,7 +51,7 @@ static int dra7_reset_assert(struct reset_ctl *reset_ctl)
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct reset_ops dra7_reset_ops = {
|
||||
static const struct reset_ops dra7_reset_ops = {
|
||||
.rst_assert = dra7_reset_assert,
|
||||
.rst_deassert = dra7_reset_deassert,
|
||||
};
|
||||
|
||||
@@ -47,7 +47,7 @@ static int mediatek_reset_deassert(struct reset_ctl *reset_ctl)
|
||||
priv->regofs + ((id / 32) << 2), BIT(id % 32), 0);
|
||||
}
|
||||
|
||||
struct reset_ops mediatek_reset_ops = {
|
||||
static const struct reset_ops mediatek_reset_ops = {
|
||||
.rst_assert = mediatek_reset_assert,
|
||||
.rst_deassert = mediatek_reset_deassert,
|
||||
};
|
||||
|
||||
@@ -66,7 +66,7 @@ static int meson_reset_deassert(struct reset_ctl *reset_ctl)
|
||||
return meson_reset_level(reset_ctl, false);
|
||||
}
|
||||
|
||||
struct reset_ops meson_reset_ops = {
|
||||
static const struct reset_ops meson_reset_ops = {
|
||||
.request = meson_reset_request,
|
||||
.rst_assert = meson_reset_assert,
|
||||
.rst_deassert = meson_reset_deassert,
|
||||
|
||||
@@ -126,7 +126,7 @@ static const struct udevice_id npcm_reset_ids[] = {
|
||||
{ }
|
||||
};
|
||||
|
||||
struct reset_ops npcm_reset_ops = {
|
||||
static const struct reset_ops npcm_reset_ops = {
|
||||
.request = npcm_reset_request,
|
||||
.rfree = npcm_reset_free,
|
||||
.rst_assert = npcm_reset_assert,
|
||||
|
||||
@@ -28,7 +28,7 @@ static int raspberrypi_reset_assert(struct reset_ctl *reset_ctl)
|
||||
}
|
||||
}
|
||||
|
||||
struct reset_ops raspberrypi_reset_ops = {
|
||||
static const struct reset_ops raspberrypi_reset_ops = {
|
||||
.request = raspberrypi_reset_request,
|
||||
.rst_assert = raspberrypi_reset_assert,
|
||||
};
|
||||
|
||||
@@ -67,7 +67,7 @@ static int sunxi_reset_deassert(struct reset_ctl *reset_ctl)
|
||||
return sunxi_set_reset(reset_ctl, true);
|
||||
}
|
||||
|
||||
struct reset_ops sunxi_reset_ops = {
|
||||
static const struct reset_ops sunxi_reset_ops = {
|
||||
.request = sunxi_reset_request,
|
||||
.rst_assert = sunxi_reset_assert,
|
||||
.rst_deassert = sunxi_reset_deassert,
|
||||
|
||||
@@ -85,7 +85,7 @@ static const struct udevice_id sandbox_reset_ids[] = {
|
||||
{ }
|
||||
};
|
||||
|
||||
struct reset_ops sandbox_reset_reset_ops = {
|
||||
static const struct reset_ops sandbox_reset_reset_ops = {
|
||||
.request = sandbox_reset_request,
|
||||
.rfree = sandbox_reset_free,
|
||||
.rst_assert = sandbox_reset_assert,
|
||||
|
||||
@@ -290,7 +290,7 @@ static int sti_reset_deassert(struct reset_ctl *reset_ctl)
|
||||
return sti_reset_program_hw(reset_ctl, false);
|
||||
}
|
||||
|
||||
struct reset_ops sti_reset_ops = {
|
||||
static const struct reset_ops sti_reset_ops = {
|
||||
.rst_assert = sti_reset_assert,
|
||||
.rst_deassert = sti_reset_deassert,
|
||||
};
|
||||
|
||||
@@ -42,7 +42,7 @@ static int tegra_car_reset_deassert(struct reset_ctl *reset_ctl)
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct reset_ops tegra_car_reset_ops = {
|
||||
static const struct reset_ops tegra_car_reset_ops = {
|
||||
.request = tegra_car_reset_request,
|
||||
.rst_assert = tegra_car_reset_assert,
|
||||
.rst_deassert = tegra_car_reset_deassert,
|
||||
|
||||
@@ -43,7 +43,7 @@ static int tegra186_reset_deassert(struct reset_ctl *reset_ctl)
|
||||
return tegra186_reset_common(reset_ctl, CMD_RESET_DEASSERT);
|
||||
}
|
||||
|
||||
struct reset_ops tegra186_reset_ops = {
|
||||
static const struct reset_ops tegra186_reset_ops = {
|
||||
.rst_assert = tegra186_reset_assert,
|
||||
.rst_deassert = tegra186_reset_deassert,
|
||||
};
|
||||
|
||||
@@ -191,7 +191,7 @@ static int sandbox_i2c_rtc_xfer(struct udevice *emul, struct i2c_msg *msg,
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct dm_i2c_ops sandbox_i2c_rtc_emul_ops = {
|
||||
static const struct dm_i2c_ops sandbox_i2c_rtc_emul_ops = {
|
||||
.xfer = sandbox_i2c_rtc_xfer,
|
||||
};
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ static int sandbox_scsi_remove(struct udevice *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct scsi_ops sandbox_scsi_ops = {
|
||||
static const struct scsi_ops sandbox_scsi_ops = {
|
||||
.exec = sandbox_scsi_exec,
|
||||
.bus_reset = sandbox_scsi_bus_reset,
|
||||
};
|
||||
|
||||
@@ -228,7 +228,7 @@ static int apple_spi_set_mode(struct udevice *bus, uint mode)
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct dm_spi_ops apple_spi_ops = {
|
||||
static const struct dm_spi_ops apple_spi_ops = {
|
||||
.xfer = apple_spi_xfer,
|
||||
.set_speed = apple_spi_set_speed,
|
||||
.set_mode = apple_spi_set_mode,
|
||||
|
||||
@@ -85,6 +85,4 @@ struct ccu_plat {
|
||||
const struct ccu_desc *desc;
|
||||
};
|
||||
|
||||
extern struct clk_ops sunxi_clk_ops;
|
||||
|
||||
#endif /* _CLK_SUNXI_H */
|
||||
|
||||
Reference in New Issue
Block a user