diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2022-12-14 13:35:09 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-01-10 15:43:47 +0100 |
commit | c0afc799fb9a19a11f651596fe23b4b755593887 (patch) | |
tree | 9c27f1533193d31757744b22b2af9186d23e67ed /drivers/misc | |
parent | e70b9d7a74698f1374244b2251216428db920aed (diff) | |
download | barebox-c0afc799fb9a19a11f651596fe23b4b755593887.tar.gz |
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/misc')
-rw-r--r-- | drivers/misc/jtag.c | 6 | ||||
-rw-r--r-- | drivers/misc/mem.c | 4 | ||||
-rw-r--r-- | drivers/misc/sram.c | 2 | ||||
-rw-r--r-- | drivers/misc/starfive-pwrseq.c | 2 | ||||
-rw-r--r-- | drivers/misc/state.c | 2 | ||||
-rw-r--r-- | drivers/misc/storage-by-uuid.c | 6 | ||||
-rw-r--r-- | drivers/misc/ubootvar.c | 12 |
7 files changed, 17 insertions, 17 deletions
diff --git a/drivers/misc/jtag.c b/drivers/misc/jtag.c index 433e22fd2c..ab241106af 100644 --- a/drivers/misc/jtag.c +++ b/drivers/misc/jtag.c @@ -256,7 +256,7 @@ static struct cdev_operations jtag_operations = { .ioctl = jtag_ioctl, }; -static void jtag_info(struct device_d *pdev) +static void jtag_info(struct device *pdev) { int dn, ret; struct jtag_rd_id jid; @@ -275,7 +275,7 @@ static void jtag_info(struct device_d *pdev) } } -static int jtag_probe(struct device_d *pdev) +static int jtag_probe(struct device *pdev) { int i, ret; struct jtag_info *info; @@ -348,7 +348,7 @@ fail_devfs_create: return ret; } -static void jtag_remove(struct device_d *pdev) +static void jtag_remove(struct device *pdev) { struct jtag_info *info = (struct jtag_info *) pdev->priv; diff --git a/drivers/misc/mem.c b/drivers/misc/mem.c index 1bf240c0a7..e1eabbffdb 100644 --- a/drivers/misc/mem.c +++ b/drivers/misc/mem.c @@ -13,7 +13,7 @@ static struct cdev_operations memops = { .memmap = generic_memmap_rw, }; -static int mem_probe(struct device_d *dev) +static int mem_probe(struct device *dev) { struct cdev *cdev; @@ -48,7 +48,7 @@ static struct driver_d mem_drv = { static int mem_init(void) { - struct device_d *dev; + struct device *dev; struct resource res = { .start = 0, .end = ~0, diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c index f4a7551fc7..7e4e8dcdd9 100644 --- a/drivers/misc/sram.c +++ b/drivers/misc/sram.c @@ -22,7 +22,7 @@ static struct cdev_operations memops = { .memmap = generic_memmap_rw, }; -static int sram_probe(struct device_d *dev) +static int sram_probe(struct device *dev) { struct resource *iores; struct sram *sram; diff --git a/drivers/misc/starfive-pwrseq.c b/drivers/misc/starfive-pwrseq.c index 62c36f3e5b..e8b52b57bb 100644 --- a/drivers/misc/starfive-pwrseq.c +++ b/drivers/misc/starfive-pwrseq.c @@ -13,7 +13,7 @@ struct starfive_pwrseq { const char **names; }; -static int starfive_pwrseq_probe(struct device_d *dev) +static int starfive_pwrseq_probe(struct device *dev) { int ret; diff --git a/drivers/misc/state.c b/drivers/misc/state.c index 2e393505d1..3dbfe7dd20 100644 --- a/drivers/misc/state.c +++ b/drivers/misc/state.c @@ -12,7 +12,7 @@ #include <linux/err.h> -static int state_probe(struct device_d *dev) +static int state_probe(struct device *dev) { struct device_node *np = dev->of_node; struct state *state; diff --git a/drivers/misc/storage-by-uuid.c b/drivers/misc/storage-by-uuid.c index 13efb9d01f..6434a077ea 100644 --- a/drivers/misc/storage-by-uuid.c +++ b/drivers/misc/storage-by-uuid.c @@ -11,7 +11,7 @@ static LIST_HEAD(sbu_list); struct sbu { char *uuid; - struct device_d *dev; + struct device *dev; struct cdev *rcdev; struct cdev cdev; struct list_head list; @@ -147,7 +147,7 @@ static void check_exist(struct sbu *sbu) } } -static int sbu_detect(struct device_d *dev) +static int sbu_detect(struct device *dev) { struct sbu *sbu = dev->priv; @@ -158,7 +158,7 @@ static int sbu_detect(struct device_d *dev) return 0; } -static int storage_by_uuid_probe(struct device_d *dev) +static int storage_by_uuid_probe(struct device *dev) { struct sbu *sbu; int ret; diff --git a/drivers/misc/ubootvar.c b/drivers/misc/ubootvar.c index 1c291343d1..059059c92f 100644 --- a/drivers/misc/ubootvar.c +++ b/drivers/misc/ubootvar.c @@ -35,7 +35,7 @@ struct ubootvar_data { static int ubootvar_flush(struct cdev *cdev) { - struct device_d *dev = cdev->dev; + struct device *dev = cdev->dev; struct ubootvar_data *ubdata = dev->priv; const char *path = ubdata->path[!ubdata->current]; uint32_t crc = 0xffffffff; @@ -125,7 +125,7 @@ static ssize_t ubootvar_read(struct cdev *cdev, void *buf, size_t count, loff_t offset, unsigned long flags) { - struct device_d *dev = cdev->dev; + struct device *dev = cdev->dev; struct ubootvar_data *ubdata = dev->priv; WARN_ON(flags & O_RWSIZE_MASK); @@ -139,7 +139,7 @@ static ssize_t ubootvar_write(struct cdev *cdev, const void *buf, size_t count, loff_t offset, unsigned long flags) { - struct device_d *dev = cdev->dev; + struct device *dev = cdev->dev; struct ubootvar_data *ubdata = dev->priv; WARN_ON(flags & O_RWSIZE_MASK); @@ -151,7 +151,7 @@ ubootvar_write(struct cdev *cdev, const void *buf, size_t count, static int ubootvar_memmap(struct cdev *cdev, void **map, int flags) { - struct device_d *dev = cdev->dev; + struct device *dev = cdev->dev; struct ubootvar_data *ubdata = dev->priv; *map = ubdata->data; @@ -166,7 +166,7 @@ static struct cdev_operations ubootvar_ops = { .flush = ubootvar_flush, }; -static void ubootenv_info(struct device_d *dev) +static void ubootenv_info(struct device *dev) { struct ubootvar_data *ubdata = dev->priv; @@ -174,7 +174,7 @@ static void ubootenv_info(struct device_d *dev) ubdata->path[ubdata->current]); } -static int ubootenv_probe(struct device_d *dev) +static int ubootenv_probe(struct device *dev) { struct ubootvar_data *ubdata; unsigned int crc_ok = 0; |