summaryrefslogtreecommitdiffstats
path: root/drivers/nvmem
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2022-12-14 13:35:09 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2023-01-10 15:43:47 +0100
commitc0afc799fb9a19a11f651596fe23b4b755593887 (patch)
tree9c27f1533193d31757744b22b2af9186d23e67ed /drivers/nvmem
parente70b9d7a74698f1374244b2251216428db920aed (diff)
downloadbarebox-c0afc799fb9a19a11f651596fe23b4b755593887.tar.gz
barebox-c0afc799fb9a19a11f651596fe23b4b755593887.tar.xz
Rename struct device_d to device
The '_d' suffix was originally introduced in case we want to import Linux struct device as a separate struct into barebox. Over time it became clear that this won't happen, instead barebox struct device_d is basically the same as Linux struct device. Rename the struct name accordingly to make porting Linux code easier. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20221214123512.189688-3-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/nvmem')
-rw-r--r--drivers/nvmem/bsec.c6
-rw-r--r--drivers/nvmem/core.c11
-rw-r--r--drivers/nvmem/eeprom_93xx46.c2
-rw-r--r--drivers/nvmem/kvx-otp-nv.c2
-rw-r--r--drivers/nvmem/ocotp.c4
-rw-r--r--drivers/nvmem/rave-sp-eeprom.c2
-rw-r--r--drivers/nvmem/rmem.c4
-rw-r--r--drivers/nvmem/snvs_lpgpr.c4
-rw-r--r--drivers/nvmem/starfive-otp.c2
9 files changed, 19 insertions, 18 deletions
diff --git a/drivers/nvmem/bsec.c b/drivers/nvmem/bsec.c
index 937a1b223c..1bda25cd10 100644
--- a/drivers/nvmem/bsec.c
+++ b/drivers/nvmem/bsec.c
@@ -21,7 +21,7 @@
#define BSEC_OTP_SERIAL 13
struct bsec_priv {
- struct device_d dev;
+ struct device dev;
u32 svc_id;
struct regmap_config map_config;
int permanent_write_enable;
@@ -108,7 +108,7 @@ static int stm32_bsec_read_mac(struct bsec_priv *priv, int offset, u8 *mac)
return 0;
}
-static void stm32_bsec_init_dt(struct bsec_priv *priv, struct device_d *dev,
+static void stm32_bsec_init_dt(struct bsec_priv *priv, struct device *dev,
struct regmap *map)
{
struct device_node *node = dev->of_node;
@@ -141,7 +141,7 @@ static void stm32_bsec_init_dt(struct bsec_priv *priv, struct device_d *dev,
of_eth_register_ethaddr(rnode, mac);
}
-static int stm32_bsec_probe(struct device_d *dev)
+static int stm32_bsec_probe(struct device *dev)
{
struct regmap *map;
struct bsec_priv *priv;
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index c056b3b63a..cd3328a650 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -15,7 +15,7 @@
struct nvmem_device {
const char *name;
- struct device_d dev;
+ struct device dev;
const struct nvmem_bus *bus;
struct list_head node;
int stride;
@@ -95,7 +95,7 @@ static struct cdev_operations nvmem_chrdev_ops = {
static int nvmem_register_cdev(struct nvmem_device *nvmem, const char *name)
{
- struct device_d *dev = &nvmem->dev;
+ struct device *dev = &nvmem->dev;
struct cdev *cdev = &nvmem->cdev;
const char *alias;
int ret;
@@ -325,7 +325,8 @@ EXPORT_SYMBOL_GPL(of_nvmem_device_get);
* Return: ERR_PTR() on error or a valid pointer to a struct nvmem_device
* on success.
*/
-struct nvmem_device *nvmem_device_get(struct device_d *dev, const char *dev_name)
+struct nvmem_device *nvmem_device_get(struct device *dev,
+ const char *dev_name)
{
if (dev->of_node) { /* try dt first */
struct nvmem_device *nvmem;
@@ -463,7 +464,7 @@ EXPORT_SYMBOL_GPL(of_nvmem_cell_get);
* to a struct nvmem_cell. The nvmem_cell will be freed by the
* nvmem_cell_put().
*/
-struct nvmem_cell *nvmem_cell_get(struct device_d *dev, const char *cell_id)
+struct nvmem_cell *nvmem_cell_get(struct device *dev, const char *cell_id)
{
struct nvmem_cell *cell;
@@ -817,7 +818,7 @@ EXPORT_SYMBOL_GPL(nvmem_cell_get_and_read);
*
* Return: 0 on success or negative errno.
*/
-int nvmem_cell_read_variable_le_u32(struct device_d *dev, const char *cell_id,
+int nvmem_cell_read_variable_le_u32(struct device *dev, const char *cell_id,
u32 *val)
{
size_t len;
diff --git a/drivers/nvmem/eeprom_93xx46.c b/drivers/nvmem/eeprom_93xx46.c
index 0340697f2a..b4aad88de3 100644
--- a/drivers/nvmem/eeprom_93xx46.c
+++ b/drivers/nvmem/eeprom_93xx46.c
@@ -367,7 +367,7 @@ static const struct nvmem_bus eeprom_93xx46_nvmem_bus = {
.read = eeprom_93xx46_read,
};
-static int eeprom_93xx46_probe(struct device_d *dev)
+static int eeprom_93xx46_probe(struct device *dev)
{
struct spi_device *spi = (struct spi_device *)dev->type_data;
struct eeprom_93xx46_platform_data *pd;
diff --git a/drivers/nvmem/kvx-otp-nv.c b/drivers/nvmem/kvx-otp-nv.c
index d614c16e1e..5f3e71afda 100644
--- a/drivers/nvmem/kvx-otp-nv.c
+++ b/drivers/nvmem/kvx-otp-nv.c
@@ -58,7 +58,7 @@ static const struct of_device_id kvx_otp_nv_match[] = {
{ /* sentinel */},
};
-static int kvx_otp_nv_probe(struct device_d *dev)
+static int kvx_otp_nv_probe(struct device *dev)
{
struct resource *res;
struct nvmem_device *nvmem;
diff --git a/drivers/nvmem/ocotp.c b/drivers/nvmem/ocotp.c
index 48701dde02..4fb2095230 100644
--- a/drivers/nvmem/ocotp.c
+++ b/drivers/nvmem/ocotp.c
@@ -123,7 +123,7 @@ struct ocotp_priv {
struct regmap *map;
void __iomem *base;
struct clk *clk;
- struct device_d dev;
+ struct device dev;
int permanent_write_enable;
int sense_enable;
struct ocotp_priv_ethaddr ethaddr[MAX_MAC_OFFSETS];
@@ -712,7 +712,7 @@ static const struct nvmem_bus imx_ocotp_nvmem_bus = {
.read = imx_ocotp_read,
};
-static int imx_ocotp_probe(struct device_d *dev)
+static int imx_ocotp_probe(struct device *dev)
{
struct resource *iores;
struct ocotp_priv *priv;
diff --git a/drivers/nvmem/rave-sp-eeprom.c b/drivers/nvmem/rave-sp-eeprom.c
index 7aef0d90a9..987ab1a4f5 100644
--- a/drivers/nvmem/rave-sp-eeprom.c
+++ b/drivers/nvmem/rave-sp-eeprom.c
@@ -285,7 +285,7 @@ static const struct nvmem_bus rave_sp_eeprom_nvmem_bus = {
.read = rave_sp_eeprom_read,
};
-static int rave_sp_eeprom_probe(struct device_d *dev)
+static int rave_sp_eeprom_probe(struct device *dev)
{
struct rave_sp *sp = dev->parent->priv;
struct nvmem_config config = { 0 };
diff --git a/drivers/nvmem/rmem.c b/drivers/nvmem/rmem.c
index b9331f48ff..19b404402a 100644
--- a/drivers/nvmem/rmem.c
+++ b/drivers/nvmem/rmem.c
@@ -9,7 +9,7 @@
#include <init.h>
struct rmem {
- struct device_d *dev;
+ struct device *dev;
const struct resource *mem;
};
@@ -25,7 +25,7 @@ static struct nvmem_bus rmem_nvmem_bus = {
.read = rmem_read,
};
-static int rmem_probe(struct device_d *dev)
+static int rmem_probe(struct device *dev)
{
struct nvmem_config config = { };
struct resource *mem;
diff --git a/drivers/nvmem/snvs_lpgpr.c b/drivers/nvmem/snvs_lpgpr.c
index 4d0d5779c0..d67d94fcd0 100644
--- a/drivers/nvmem/snvs_lpgpr.c
+++ b/drivers/nvmem/snvs_lpgpr.c
@@ -27,7 +27,7 @@ struct snvs_lpgpr_cfg {
};
struct snvs_lpgpr_priv {
- struct device_d *dev;
+ struct device *dev;
struct regmap *regmap;
struct nvmem_config cfg;
const struct snvs_lpgpr_cfg *dcfg;
@@ -78,7 +78,7 @@ static const struct nvmem_bus snvs_lpgpr_nvmem_bus = {
.read = snvs_lpgpr_read,
};
-static int snvs_lpgpr_probe(struct device_d *dev)
+static int snvs_lpgpr_probe(struct device *dev)
{
struct device_node *node = dev->of_node;
struct device_node *syscon_node;
diff --git a/drivers/nvmem/starfive-otp.c b/drivers/nvmem/starfive-otp.c
index 0f668abdcc..06ede3510c 100644
--- a/drivers/nvmem/starfive-otp.c
+++ b/drivers/nvmem/starfive-otp.c
@@ -138,7 +138,7 @@ static struct regmap_bus starfive_otp_regmap_bus = {
.reg_write = starfive_otp_write,
};
-static int starfive_otp_probe(struct device_d *dev)
+static int starfive_otp_probe(struct device *dev)
{
struct starfive_otp *priv;
struct regmap_config config = {};