summaryrefslogtreecommitdiff
path: root/include/linux
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 /include/linux
parente70b9d7a74698f1374244b2251216428db920aed (diff)
downloadbarebox-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 'include/linux')
-rw-r--r--include/linux/amba/bus.h8
-rw-r--r--include/linux/basic_mmio_gpio.h2
-rw-r--r--include/linux/clk.h161
-rw-r--r--include/linux/clkdev.h4
-rw-r--r--include/linux/font.h8
-rw-r--r--include/linux/hw_random.h4
-rw-r--r--include/linux/mdio-mux.h2
-rw-r--r--include/linux/mfd/axp20x.h2
-rw-r--r--include/linux/mfd/core.h5
-rw-r--r--include/linux/mtd/mtd.h2
-rw-r--r--include/linux/mtd/spi-nor.h2
-rw-r--r--include/linux/nvmem-consumer.h14
-rw-r--r--include/linux/nvmem-provider.h2
-rw-r--r--include/linux/pci.h6
-rw-r--r--include/linux/phy.h8
-rw-r--r--include/linux/phy/phy.h39
-rw-r--r--include/linux/printk.h14
-rw-r--r--include/linux/reboot-mode.h4
-rw-r--r--include/linux/regulator/of_regulator.h6
-rw-r--r--include/linux/remoteproc.h4
-rw-r--r--include/linux/reset.h25
-rw-r--r--include/linux/rtc.h4
-rw-r--r--include/linux/scmi_protocol.h14
-rw-r--r--include/linux/virtio.h6
24 files changed, 186 insertions, 160 deletions
diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h
index 390220a3de..a324c41d90 100644
--- a/include/linux/amba/bus.h
+++ b/include/linux/amba/bus.h
@@ -37,7 +37,7 @@ struct amba_id {
struct clk;
struct amba_device {
- struct device_d dev;
+ struct device dev;
struct resource res;
void __iomem *base;
struct clk *pclk;
@@ -75,12 +75,12 @@ int amba_device_add(struct amba_device *);
int amba_device_register(struct amba_device *, struct resource *);
struct amba_device *
-amba_aphb_device_add(struct device_d *parent, const char *name, int id,
+amba_aphb_device_add(struct device *parent, const char *name, int id,
resource_size_t base, size_t size,
void *pdata, unsigned int periphid);
static inline struct amba_device *
-amba_apb_device_add(struct device_d *parent, const char *name, int id,
+amba_apb_device_add(struct device *parent, const char *name, int id,
resource_size_t base, size_t size,
void *pdata, unsigned int periphid)
{
@@ -89,7 +89,7 @@ amba_apb_device_add(struct device_d *parent, const char *name, int id,
}
static inline struct amba_device *
-amba_ahb_device_add(struct device_d *parent, const char *name, int id,
+amba_ahb_device_add(struct device *parent, const char *name, int id,
resource_size_t base, size_t size,
void *pdata, unsigned int periphid)
{
diff --git a/include/linux/basic_mmio_gpio.h b/include/linux/basic_mmio_gpio.h
index 34e2f470fb..8917f99ccb 100644
--- a/include/linux/basic_mmio_gpio.h
+++ b/include/linux/basic_mmio_gpio.h
@@ -60,7 +60,7 @@ static inline struct bgpio_chip *to_bgpio_chip(struct gpio_chip *gc)
return container_of(gc, struct bgpio_chip, gc);
}
-int bgpio_init(struct bgpio_chip *bgc, struct device_d *dev,
+int bgpio_init(struct bgpio_chip *bgc, struct device *dev,
unsigned int sz, void __iomem *dat, void __iomem *set,
void __iomem *clr, void __iomem *dirout, void __iomem *dirin,
unsigned long flags);
diff --git a/include/linux/clk.h b/include/linux/clk.h
index 42c64d650d..4cece8ba5e 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -15,7 +15,7 @@
#include <linux/stringify.h>
#include <xfuncs.h>
-struct device_d;
+struct device;
/*
* The base API.
@@ -60,7 +60,7 @@ struct clk_bulk_data {
*
* clk_get should not be called from within interrupt context.
*/
-struct clk *clk_get(struct device_d *dev, const char *id);
+struct clk *clk_get(struct device *dev, const char *id);
/**
* clk_enable - inform the system when the clock source should be running.
@@ -169,11 +169,11 @@ struct clk *clk_get_sys(const char *dev_id, const char *con_id);
* Assumes clkdev, see clkdev.h for more info.
*/
int clk_add_alias(const char *alias, const char *alias_dev_name, char *id,
- struct device_d *dev);
+ struct device *dev);
#else
-static inline struct clk *clk_get(struct device_d *dev, const char *id)
+static inline struct clk *clk_get(struct device *dev, const char *id)
{
return NULL;
}
@@ -306,9 +306,11 @@ struct clk *clk_register_fixed_rate(const char *name,
const char *parent_name, unsigned long flags,
unsigned long fixed_rate);
-struct clk_hw *clk_hw_register_fixed_rate(struct device_d *dev, const char *name,
- const char *parent_name, unsigned long flags,
- unsigned long rate);
+struct clk_hw *clk_hw_register_fixed_rate(struct device *dev,
+ const char *name,
+ const char *parent_name,
+ unsigned long flags,
+ unsigned long rate);
static inline struct clk *clk_fixed(const char *name, int rate)
{
@@ -363,10 +365,10 @@ void clk_divider_free(struct clk *clk_divider);
struct clk *clk_divider(const char *name, const char *parent,
unsigned clk_flags, void __iomem *reg, u8 shift,
u8 width, unsigned div_flags);
-struct clk *clk_register_divider(struct device_d *dev, const char *name,
- const char *parent_name, unsigned long flags,
- void __iomem *reg, u8 shift, u8 width,
- u8 clk_divider_flags, spinlock_t *lock);
+struct clk *clk_register_divider(struct device *dev, const char *name,
+ const char *parent_name, unsigned long flags,
+ void __iomem *reg, u8 shift, u8 width,
+ u8 clk_divider_flags, spinlock_t *lock);
struct clk *clk_divider_one_based(const char *name, const char *parent,
unsigned clk_flags, void __iomem *reg,
u8 shift, u8 width, unsigned div_flags);
@@ -374,22 +376,29 @@ struct clk *clk_divider_table(const char *name, const char *parent,
unsigned clk_flags, void __iomem *reg, u8 shift,
u8 width, const struct clk_div_table *table,
unsigned div_flags);
-struct clk *clk_register_divider_table(struct device_d *dev, const char *name,
- const char *parent_name, unsigned long flags,
- void __iomem *reg, u8 shift, u8 width,
- u8 clk_divider_flags, const struct clk_div_table *table,
- spinlock_t *lock);
-
-struct clk_hw *clk_hw_register_divider_table(struct device_d *dev, const char *name,
- const char *parent_name, unsigned long flags,
- void __iomem *reg, u8 shift, u8 width,
- u8 clk_divider_flags, const struct clk_div_table *table,
- spinlock_t *lock);
-
-struct clk_hw *clk_hw_register_divider(struct device_d *dev, const char *name,
- const char *parent_name, unsigned long flags,
- void __iomem *reg, u8 shift, u8 width,
- u8 clk_divider_flags, spinlock_t *lock);
+struct clk *clk_register_divider_table(struct device *dev, const char *name,
+ const char *parent_name,
+ unsigned long flags,
+ void __iomem *reg, u8 shift, u8 width,
+ u8 clk_divider_flags,
+ const struct clk_div_table *table,
+ spinlock_t *lock);
+
+struct clk_hw *clk_hw_register_divider_table(struct device *dev,
+ const char *name,
+ const char *parent_name,
+ unsigned long flags,
+ void __iomem *reg, u8 shift,
+ u8 width,
+ u8 clk_divider_flags,
+ const struct clk_div_table *table,
+ spinlock_t *lock);
+
+struct clk_hw *clk_hw_register_divider(struct device *dev, const char *name,
+ const char *parent_name,
+ unsigned long flags,
+ void __iomem *reg, u8 shift, u8 width,
+ u8 clk_divider_flags, spinlock_t *lock);
struct clk_fixed_factor {
struct clk_hw hw;
@@ -408,13 +417,17 @@ extern struct clk_ops clk_fixed_factor_ops;
struct clk *clk_fixed_factor(const char *name,
const char *parent, unsigned int mult, unsigned int div,
unsigned flags);
-struct clk *clk_register_fixed_factor(struct device_d *dev, const char *name,
- const char *parent_name, unsigned long flags,
- unsigned int mult, unsigned int div);
-
-struct clk_hw *clk_hw_register_fixed_factor(struct device_d *dev,
- const char *name, const char *parent_name, unsigned long flags,
- unsigned int mult, unsigned int div);
+struct clk *clk_register_fixed_factor(struct device *dev, const char *name,
+ const char *parent_name,
+ unsigned long flags,
+ unsigned int mult, unsigned int div);
+
+struct clk_hw *clk_hw_register_fixed_factor(struct device *dev,
+ const char *name,
+ const char *parent_name,
+ unsigned long flags,
+ unsigned int mult,
+ unsigned int div);
/**
* struct clk_fractional_divider - adjustable fractional divider clock
@@ -493,17 +506,19 @@ void clk_mux_free(struct clk *clk_mux);
struct clk *clk_mux(const char *name, unsigned clk_flags, void __iomem *reg,
u8 shift, u8 width, const char * const *parents,
u8 num_parents, unsigned mux_flags);
-struct clk *clk_register_mux(struct device_d *dev, const char *name,
- const char * const *parent_names, u8 num_parents,
- unsigned long flags,
- void __iomem *reg, u8 shift, u8 width,
- u8 clk_mux_flags, spinlock_t *lock);
-
-struct clk_hw *__clk_hw_register_mux(struct device_d *dev,
- const char *name, u8 num_parents,
- const char * const *parent_names,
- unsigned long flags, void __iomem *reg, u8 shift, u32 mask,
- u8 clk_mux_flags, u32 *table, spinlock_t *lock);
+struct clk *clk_register_mux(struct device *dev, const char *name,
+ const char * const *parent_names, u8 num_parents,
+ unsigned long flags,
+ void __iomem *reg, u8 shift, u8 width,
+ u8 clk_mux_flags, spinlock_t *lock);
+
+struct clk_hw *__clk_hw_register_mux(struct device *dev,
+ const char *name, u8 num_parents,
+ const char * const *parent_names,
+ unsigned long flags, void __iomem *reg,
+ u8 shift, u32 mask,
+ u8 clk_mux_flags, u32 *table,
+ spinlock_t *lock);
#define clk_hw_register_mux(dev, name, parent_names, \
num_parents, flags, reg, shift, mask, \
@@ -553,15 +568,19 @@ struct clk *clk_gate_inverted(const char *name, const char *parent, void __iomem
u8 shift, unsigned flags);
struct clk *clk_gate_shared(const char *name, const char *parent, const char *shared,
unsigned flags);
-struct clk *clk_register_gate(struct device_d *dev, const char *name,
- const char *parent_name, unsigned long flags,
- void __iomem *reg, u8 bit_idx,
- u8 clk_gate_flags, spinlock_t *lock);
-
-static inline struct clk_hw *clk_hw_register_gate(struct device_d *dev,
- const char *name, const char *parent_name,
- unsigned long flags, void __iomem *reg, u8 bit_idx,
- u8 clk_gate_flags, spinlock_t *lock)
+struct clk *clk_register_gate(struct device *dev, const char *name,
+ const char *parent_name, unsigned long flags,
+ void __iomem *reg, u8 bit_idx,
+ u8 clk_gate_flags, spinlock_t *lock);
+
+static inline struct clk_hw *clk_hw_register_gate(struct device *dev,
+ const char *name,
+ const char *parent_name,
+ unsigned long flags,
+ void __iomem *reg,
+ u8 bit_idx,
+ u8 clk_gate_flags,
+ spinlock_t *lock)
{
return clk_to_clk_hw(clk_register_gate(dev, xstrdup(name), xstrdup(parent_name),
flags, reg, bit_idx,
@@ -578,9 +597,9 @@ int clk_parent_set_rate(struct clk_hw *hw, unsigned long rate,
unsigned long parent_rate);
int bclk_register(struct clk *clk);
-struct clk *clk_register(struct device_d *dev, struct clk_hw *hw);
+struct clk *clk_register(struct device *dev, struct clk_hw *hw);
-static inline int clk_hw_register(struct device_d *dev, struct clk_hw *hw)
+static inline int clk_hw_register(struct device *dev, struct clk_hw *hw)
{
return PTR_ERR_OR_ZERO(clk_register(dev, hw));
}
@@ -597,13 +616,17 @@ struct clk *clk_register_composite(const char *name,
struct clk *gate_clk,
unsigned long flags);
-struct clk_hw *clk_hw_register_composite(struct device_d *dev,
- const char *name, const char * const *parent_names,
- int num_parents,
- struct clk_hw *mux_hw, const struct clk_ops *mux_ops,
- struct clk_hw *rate_hw, const struct clk_ops *rate_ops,
- struct clk_hw *gate_hw, const struct clk_ops *gate_ops,
- unsigned long flags);
+struct clk_hw *clk_hw_register_composite(struct device *dev,
+ const char *name,
+ const char * const *parent_names,
+ int num_parents,
+ struct clk_hw *mux_hw,
+ const struct clk_ops *mux_ops,
+ struct clk_hw *rate_hw,
+ const struct clk_ops *rate_ops,
+ struct clk_hw *gate_hw,
+ const struct clk_ops *gate_ops,
+ unsigned long flags);
static inline const char *clk_hw_get_name(struct clk_hw *hw)
{
@@ -773,7 +796,7 @@ static inline void clk_unregister(struct clk *clk)
*
* clk_bulk_get should not be called from within interrupt context.
*/
-int __must_check clk_bulk_get(struct device_d *dev, int num_clks,
+int __must_check clk_bulk_get(struct device *dev, int num_clks,
struct clk_bulk_data *clks);
/**
@@ -786,7 +809,7 @@ int __must_check clk_bulk_get(struct device_d *dev, int num_clks,
* In this case, instead of returning -ENOENT, the function returns 0 and
* NULL for a clk for which a clock producer could not be determined.
*/
-int __must_check clk_bulk_get_optional(struct device_d *dev, int num_clks,
+int __must_check clk_bulk_get_optional(struct device *dev, int num_clks,
struct clk_bulk_data *clks);
/**
@@ -807,7 +830,7 @@ int __must_check clk_bulk_get_optional(struct device_d *dev, int num_clks,
*
* clk_bulk_get should not be called from within interrupt context.
*/
-int __must_check clk_bulk_get_all(struct device_d *dev,
+int __must_check clk_bulk_get_all(struct device *dev,
struct clk_bulk_data **clks);
/**
@@ -867,20 +890,20 @@ int __must_check clk_bulk_enable(int num_clks,
void clk_bulk_disable(int num_clks, const struct clk_bulk_data *clks);
#else
-static inline int __must_check clk_bulk_get(struct device_d *dev, int num_clks,
+static inline int __must_check clk_bulk_get(struct device *dev, int num_clks,
struct clk_bulk_data *clks)
{
return 0;
}
-static inline int __must_check clk_bulk_get_optional(struct device_d *dev,
+static inline int __must_check clk_bulk_get_optional(struct device *dev,
int num_clks,
struct clk_bulk_data *clks)
{
return 0;
}
-static inline int __must_check clk_bulk_get_all(struct device_d *dev,
+static inline int __must_check clk_bulk_get_all(struct device *dev,
struct clk_bulk_data **clks)
{
return 0;
diff --git a/include/linux/clkdev.h b/include/linux/clkdev.h
index eeadcfefa7..65edbd760b 100644
--- a/include/linux/clkdev.h
+++ b/include/linux/clkdev.h
@@ -13,7 +13,7 @@
#define __CLKDEV_H
struct clk;
-struct device_d;
+struct device;
struct clk_lookup {
struct list_head node;
@@ -30,7 +30,7 @@ void clkdev_add(struct clk_lookup *cl);
void clkdev_drop(struct clk_lookup *cl);
void clkdev_add_table(struct clk_lookup *, size_t);
-int clk_add_alias(const char *, const char *, char *, struct device_d *);
+int clk_add_alias(const char *, const char *, char *, struct device *);
int clk_register_clkdev(struct clk *, const char *, const char *, ...);
int clkdev_add_physbase(struct clk *clk, unsigned long base, const char *id);
diff --git a/include/linux/font.h b/include/linux/font.h
index feeab97191..5c4bcd151d 100644
--- a/include/linux/font.h
+++ b/include/linux/font.h
@@ -32,10 +32,10 @@ struct font_desc {
extern int find_font_index(const struct font_desc *font, int ch);
extern const struct font_desc *find_font_enum(int n);
-extern struct param_d *add_param_font(struct device_d *dev,
- int (*set)(struct param_d *p, void *priv),
- int (*get)(struct param_d *p, void *priv),
- int *value, void *priv);
+extern struct param_d *add_param_font(struct device *dev,
+ int (*set)(struct param_d *p, void *priv),
+ int (*get)(struct param_d *p, void *priv),
+ int *value, void *priv);
int font_register(struct font_desc *font);
diff --git a/include/linux/hw_random.h b/include/linux/hw_random.h
index e541abfa17..fad41b6880 100644
--- a/include/linux/hw_random.h
+++ b/include/linux/hw_random.h
@@ -30,12 +30,12 @@ struct hwrng {
struct list_head list;
struct cdev cdev;
- struct device_d *dev;
+ struct device *dev;
void *buf;
};
/* Register a new Hardware Random Number Generator driver. */
-int hwrng_register(struct device_d *dev, struct hwrng *rng);
+int hwrng_register(struct device *dev, struct hwrng *rng);
#ifdef CONFIG_HWRNG
struct hwrng *hwrng_get_first(void);
diff --git a/include/linux/mdio-mux.h b/include/linux/mdio-mux.h
index 1730939bfc..c35220a62d 100644
--- a/include/linux/mdio-mux.h
+++ b/include/linux/mdio-mux.h
@@ -19,7 +19,7 @@
* @data Private data used by switch_fn()
* @mux_bus An optional parent bus (Other case are to use parent_bus property)
*/
-int mdio_mux_init(struct device_d *dev,
+int mdio_mux_init(struct device *dev,
struct device_node *mux_node,
int (*switch_fn) (int cur, int desired, void *data),
void *data,
diff --git a/include/linux/mfd/axp20x.h b/include/linux/mfd/axp20x.h
index 150ff063b8..b406c019e4 100644
--- a/include/linux/mfd/axp20x.h
+++ b/include/linux/mfd/axp20x.h
@@ -449,7 +449,7 @@ enum {
};
struct axp20x_dev {
- struct device_d *dev;
+ struct device *dev;
struct regmap *regmap;
long variant;
int nr_cells;
diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h
index 2b3b51c69e..5175bbe370 100644
--- a/include/linux/mfd/core.h
+++ b/include/linux/mfd/core.h
@@ -7,7 +7,7 @@
#ifndef MFD_CORE_H
#define MFD_CORE_H
-struct device_d;
+struct device;
/*
* This struct describes the MFD part ("cell").
@@ -18,6 +18,7 @@ struct mfd_cell {
const char *name;
};
-int mfd_add_devices(struct device_d *parent, const struct mfd_cell *cells, int n_devs);
+int mfd_add_devices(struct device *parent, const struct mfd_cell *cells,
+ int n_devs);
#endif
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 3fe3bdb678..6b539a9ece 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -225,7 +225,7 @@ struct mtd_info {
int (*_get_device) (struct mtd_info *mtd);
void (*_put_device) (struct mtd_info *mtd);
- struct device_d dev;
+ struct device dev;
struct cdev cdev;
struct cdev *cdev_bb;
diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h
index 1c6f442866..fc7cefb55e 100644
--- a/include/linux/mtd/spi-nor.h
+++ b/include/linux/mtd/spi-nor.h
@@ -222,7 +222,7 @@ enum spi_nor_option_flags {
struct spi_nor {
struct mtd_info *mtd;
struct mutex lock;
- struct device_d *dev;
+ struct device *dev;
const struct flash_info *info;
u32 page_size;
u8 addr_width;
diff --git a/include/linux/nvmem-consumer.h b/include/linux/nvmem-consumer.h
index 1fce7e1ae0..397c4c29da 100644
--- a/include/linux/nvmem-consumer.h
+++ b/include/linux/nvmem-consumer.h
@@ -12,7 +12,7 @@
#ifndef _LINUX_NVMEM_CONSUMER_H
#define _LINUX_NVMEM_CONSUMER_H
-struct device_d;
+struct device;
struct device_node;
/* consumer cookie */
struct nvmem_cell;
@@ -29,18 +29,18 @@ struct nvmem_cell_info {
#if IS_ENABLED(CONFIG_NVMEM)
/* Cell based interface */
-struct nvmem_cell *nvmem_cell_get(struct device_d *dev, const char *name);
+struct nvmem_cell *nvmem_cell_get(struct device *dev, const char *name);
void nvmem_cell_put(struct nvmem_cell *cell);
void *nvmem_cell_read(struct nvmem_cell *cell, size_t *len);
void *nvmem_cell_get_and_read(struct device_node *np, const char *cell_name,
size_t bytes);
-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);
int nvmem_cell_write(struct nvmem_cell *cell, void *buf, size_t len);
/* direct nvmem device read/write interface */
-struct nvmem_device *nvmem_device_get(struct device_d *dev, const char *name);
+struct nvmem_device *nvmem_device_get(struct device *dev, const char *name);
void nvmem_device_put(struct nvmem_device *nvmem);
int nvmem_device_read(struct nvmem_device *nvmem, unsigned int offset,
size_t bytes, void *buf);
@@ -55,7 +55,7 @@ void nvmem_devices_print(void);
#else
-static inline struct nvmem_cell *nvmem_cell_get(struct device_d *dev,
+static inline struct nvmem_cell *nvmem_cell_get(struct device *dev,
const char *name)
{
return ERR_PTR(-EOPNOTSUPP);
@@ -77,7 +77,7 @@ static inline void *nvmem_cell_get_and_read(struct device_node *np,
return ERR_PTR(-EOPNOTSUPP);
}
-static inline int nvmem_cell_read_variable_le_u32(struct device_d *dev,
+static inline int nvmem_cell_read_variable_le_u32(struct device *dev,
const char *cell_id,
u32 *val)
{
@@ -90,7 +90,7 @@ static inline int nvmem_cell_write(struct nvmem_cell *cell,
return -EOPNOTSUPP;
}
-static inline struct nvmem_device *nvmem_device_get(struct device_d *dev,
+static inline struct nvmem_device *nvmem_device_get(struct device *dev,
const char *name)
{
return ERR_PTR(-EOPNOTSUPP);
diff --git a/include/linux/nvmem-provider.h b/include/linux/nvmem-provider.h
index a293f60c1e..1d4e1b75b2 100644
--- a/include/linux/nvmem-provider.h
+++ b/include/linux/nvmem-provider.h
@@ -23,7 +23,7 @@ struct nvmem_bus {
};
struct nvmem_config {
- struct device_d *dev;
+ struct device *dev;
const char *name;
bool read_only;
struct cdev *cdev;
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 269e7b354c..a97124a5a9 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -102,7 +102,7 @@ struct pci_dev {
struct pci_slot *slot; /* Physical slot this device is in */
const struct pci_device_id *id; /* the id this device matches */
- struct device_d dev;
+ struct device dev;
unsigned int devfn; /* encoded device & function index */
unsigned short vendor;
@@ -141,7 +141,7 @@ enum {
};
struct pci_bus {
struct pci_controller *host; /* associated host controller */
- struct device_d *parent;
+ struct device *parent;
struct pci_bus *parent_bus; /* parent bus */
struct list_head node; /* node in list of buses */
struct list_head children; /* list of child buses */
@@ -173,7 +173,7 @@ extern struct pci_ops *pci_ops;
*/
struct pci_controller {
struct pci_controller *next;
- struct device_d *parent;
+ struct device *parent;
struct pci_bus *bus;
const struct pci_ops *pci_ops;
diff --git a/include/linux/phy.h b/include/linux/phy.h
index ba1740ff55..39f2faa38d 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -100,9 +100,9 @@ struct mii_bus {
int (*write)(struct mii_bus *bus, int phy_id, int regnum, u16 val);
int (*reset)(struct mii_bus *bus);
- struct device_d *parent;
+ struct device *parent;
- struct device_d dev;
+ struct device dev;
/* list of all PHYs on bus */
struct phy_device *phy_map[PHY_MAX_ADDR];
@@ -129,7 +129,7 @@ struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr);
extern struct list_head mii_bus_list;
-int mdiobus_detect(struct device_d *dev);
+int mdiobus_detect(struct device *dev);
#define for_each_mii_bus(mii) \
list_for_each_entry(mii, &mii_bus_list, list)
@@ -156,7 +156,7 @@ int mdiobus_write(struct mii_bus *bus, int addr, u32 regnum, u16 val);
struct phy_device {
struct mii_bus *bus;
- struct device_d dev;
+ struct device dev;
u32 phy_id;
diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h
index 321e546f90..5dcc5b108a 100644
--- a/include/linux/phy/phy.h
+++ b/include/linux/phy/phy.h
@@ -55,7 +55,7 @@ struct phy_attrs {
* @phy_attrs: used to specify PHY specific attributes
*/
struct phy {
- struct device_d dev;
+ struct device dev;
int id;
const struct phy_ops *ops;
int init_count;
@@ -72,10 +72,10 @@ struct phy {
* @list: to maintain a linked list of PHY providers
*/
struct phy_provider {
- struct device_d *dev;
+ struct device *dev;
struct list_head list;
- struct phy * (*of_xlate)(struct device_d *dev,
- struct of_phandle_args *args);
+ struct phy * (*of_xlate)(struct device *dev,
+ struct of_phandle_args *args);
};
/**
@@ -133,21 +133,21 @@ static inline void phy_set_bus_width(struct phy *phy, int bus_width)
{
phy->attrs.bus_width = bus_width;
}
-struct phy *phy_get(struct device_d *dev, const char *string);
-struct phy *phy_optional_get(struct device_d *dev, const char *string);
-struct phy *of_phy_get_by_phandle(struct device_d *dev, const char *phandle,
+struct phy *phy_get(struct device *dev, const char *string);
+struct phy *phy_optional_get(struct device *dev, const char *string);
+struct phy *of_phy_get_by_phandle(struct device *dev, const char *phandle,
u8 index);
void phy_put(struct phy *phy);
struct phy *of_phy_get(struct device_node *np, const char *con_id);
-struct phy *phy_create(struct device_d *dev, struct device_node *node,
+struct phy *phy_create(struct device *dev, struct device_node *node,
const struct phy_ops *ops);
void phy_destroy(struct phy *phy);
-struct phy_provider *__of_phy_provider_register(struct device_d *dev,
- struct phy * (*of_xlate)(struct device_d *dev,
- struct of_phandle_args *args));
+struct phy_provider *__of_phy_provider_register(struct device *dev,
+ struct phy * (*of_xlate)(struct device *dev,
+ struct of_phandle_args *args));
void of_phy_provider_unregister(struct phy_provider *phy_provider);
struct usb_phy *phy_to_usbphy(struct phy *phy);
-struct phy *phy_get_by_index(struct device_d *dev, int index);
+struct phy *phy_get_by_index(struct device *dev, int index);
#else
static inline int phy_init(struct phy *phy)
{
@@ -187,18 +187,18 @@ static inline void phy_set_bus_width(struct phy *phy, int bus_width)
return;
}
-static inline struct phy *phy_get(struct device_d *dev, const char *string)
+static inline struct phy *phy_get(struct device *dev, const char *string)
{
return ERR_PTR(-ENOSYS);
}
-static inline struct phy *phy_optional_get(struct device_d *dev,
+static inline struct phy *phy_optional_get(struct device *dev,
const char *string)
{
return NULL;
}
-static inline struct phy *of_phy_get_by_phandle(struct device_d *dev,
+static inline struct phy *of_phy_get_by_phandle(struct device *dev,
const char *phandle, u8 index)
{
return ERR_PTR(-ENOSYS);
@@ -213,7 +213,7 @@ static inline struct phy *of_phy_get(struct device_node *np, const char *con_id)
return ERR_PTR(-ENOSYS);
}
-static inline struct phy *phy_create(struct device_d *dev,
+static inline struct phy *phy_create(struct device *dev,
struct device_node *node,
const struct phy_ops *ops)
{
@@ -224,9 +224,8 @@ static inline void phy_destroy(struct phy *phy)
{
}
-static inline struct phy_provider *__of_phy_provider_register(
- struct device_d *dev, struct phy * (*of_xlate)(
- struct device_d *dev, struct of_phandle_args *args))
+static inline struct phy_provider *__of_phy_provider_register(struct device *dev,
+ struct phy * (*of_xlate)(struct device *dev, struct of_phandle_args *args))
{
return ERR_PTR(-ENOSYS);
}
@@ -240,7 +239,7 @@ static inline struct usb_phy *phy_to_usbphy(struct phy *phy)
return NULL;
}
-static inline struct phy *phy_get_by_index(struct device_d *dev, int index)
+static inline struct phy *phy_get_by_index(struct device *dev, int index)
{
return ERR_PTR(-ENODEV);
}
diff --git a/include/linux/printk.h b/include/linux/printk.h
index e21e859bf0..2fd6551e0c 100644
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
@@ -25,13 +25,14 @@
#endif
/* debugging and troubleshooting/diagnostic helpers. */
-struct device_d;
+struct device;
#ifndef CONFIG_CONSOLE_NONE
-int dev_printf(int level, const struct device_d *dev, const char *format, ...)
+int dev_printf(int level, const struct device *dev, const char *format, ...)
__attribute__ ((format(__printf__, 3, 4)));
#else
-static inline int dev_printf(int level, const struct device_d *dev, const char *format, ...)
+static inline int dev_printf(int level, const struct device *dev,
+ const char *format, ...)
{
return 0;
}
@@ -76,12 +77,13 @@ static inline int pr_print(int level, const char *format, ...)
__dev_printf(8, (dev) , format , ## arg)
#if LOGLEVEL >= MSG_ERR
-int dev_err_probe(struct device_d *dev, int err, const char *fmt, ...)
+int dev_err_probe(struct device *dev, int err, const char *fmt, ...)
__attribute__ ((format(__printf__, 3, 4)));
#elif !defined(dev_err_probe)
-static int dev_err_probe(struct device_d *dev, int err, const char *fmt, ...)
+static int dev_err_probe(struct device *dev, int err, const char *fmt, ...)
__attribute__ ((format(__printf__, 3, 4)));
-static inline int dev_err_probe(struct device_d *dev, int err, const char *fmt, ...)
+static inline int dev_err_probe(struct device *dev, int err, const char *fmt,
+ ...)
{
return err;
}
diff --git a/include/linux/reboot-mode.h b/include/linux/reboot-mode.h
index 9d9ce19c0e..66e7768fdf 100644
--- a/include/linux/reboot-mode.h
+++ b/include/linux/reboot-mode.h
@@ -4,11 +4,11 @@
#include <linux/types.h>
-struct device_d;
+struct device;
#ifdef CONFIG_REBOOT_MODE
struct reboot_mode_driver {
- struct device_d *dev;
+ struct device *dev;
int (*write)(struct reboot_mode_driver *reboot, const u32 *magic);
int priority;
bool no_fixup;
diff --git a/include/linux/regulator/of_regulator.h b/include/linux/regulator/of_regulator.h
index de6d053e26..649e11db9f 100644
--- a/include/linux/regulator/of_regulator.h
+++ b/include/linux/regulator/of_regulator.h
@@ -8,7 +8,7 @@
#include <linux/types.h>
-struct device_d;
+struct device;
struct regulator_desc;
struct of_regulator_match {
@@ -19,11 +19,11 @@ struct of_regulator_match {
};
#if defined(CONFIG_OFDEVICE)
-extern int of_regulator_match(struct device_d *dev, struct device_node *node,
+extern int of_regulator_match(struct device *dev, struct device_node *node,
struct of_regulator_match *matches,
unsigned int num_matches);
#else
-static inline int of_regulator_match(struct device_d *dev,
+static inline int of_regulator_match(struct device *dev,
struct device_node *node,
struct of_regulator_match *matches,
unsigned int num_matches)
diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h
index c6264d1c0a..170fff7987 100644
--- a/include/linux/remoteproc.h
+++ b/include/linux/remoteproc.h
@@ -37,13 +37,13 @@ struct rproc {
const char *name;
void *priv;
struct rproc_ops *ops;
- struct device_d dev;
+ struct device dev;
void *fw_buf;
size_t fw_buf_ofs;
};
-struct rproc *rproc_alloc(struct device_d *dev, const char *name,
+struct rproc *rproc_alloc(struct device *dev, const char *name,
const struct rproc_ops *ops, int len);
int rproc_add(struct rproc *rproc);
diff --git a/include/linux/reset.h b/include/linux/reset.h
index 2d788547f4..7a08b8f945 100644
--- a/include/linux/reset.h
+++ b/include/linux/reset.h
@@ -3,7 +3,7 @@
#ifndef _LINUX_RESET_H_
#define _LINUX_RESET_H_
-struct device_d;
+struct device;
struct reset_control;
#ifdef CONFIG_RESET_CONTROLLER
@@ -13,18 +13,18 @@ int reset_control_reset(struct reset_control *rstc);
int reset_control_assert(struct reset_control *rstc);
int reset_control_deassert(struct reset_control *rstc);
-struct reset_control *reset_control_get(struct device_d *dev, const char *id);
+struct reset_control *reset_control_get(struct device *dev, const char *id);
struct reset_control *of_reset_control_get(struct device_node *node,
const char *id);
void reset_control_put(struct reset_control *rstc);
-int __must_check device_reset(struct device_d *dev);
+int __must_check device_reset(struct device *dev);
-int __must_check device_reset_us(struct device_d *dev, int us);
+int __must_check device_reset_us(struct device *dev, int us);
-int __must_check device_reset_all(struct device_d *dev);
+int __must_check device_reset_all(struct device *dev);
-int reset_control_get_count(struct device_d *dev);
+int reset_control_get_count(struct device *dev);
#else
@@ -55,7 +55,7 @@ of_reset_control_get(struct device_node *node, const char *id)
}
static inline struct reset_control *
-reset_control_get(struct device_d *dev, const char *id)
+reset_control_get(struct device *dev, const char *id)
{
return NULL;
}
@@ -64,29 +64,30 @@ static inline void reset_control_put(struct reset_control *rstc)
{
}
-static inline int device_reset_us(struct device_d *dev, int us)
+static inline int device_reset_us(struct device *dev, int us)
{
return 0;
}
-static inline int device_reset(struct device_d *dev)
+static inline int device_reset(struct device *dev)
{
return 0;
}
-static inline int device_reset_all(struct device_d *dev)
+static inline int device_reset_all(struct device *dev)
{
return 0;
}
-static inline int reset_control_get_count(struct device_d *dev)
+static inline int reset_control_get_count(struct device *dev)
{
return 0;
}
#endif /* CONFIG_RESET_CONTROLLER */
-static inline struct reset_control *reset_control_get_optional(struct device_d *dev, const char *id)
+static inline struct reset_control *reset_control_get_optional(struct device *dev,
+ const char *id)
{
struct reset_control *rstc = reset_control_get(dev, id);
return rstc == ERR_PTR(-ENOENT) ? NULL : rstc;
diff --git a/include/linux/rtc.h b/include/linux/rtc.h
index 632bc9b7bc..def07548c5 100644
--- a/include/linux/rtc.h
+++ b/include/linux/rtc.h
@@ -24,8 +24,8 @@ extern void rtc_time_to_tm(unsigned long time, struct rtc_time *tm);
struct rtc_class_ops;
struct rtc_device {
- struct device_d *dev;
- struct device_d class_dev;
+ struct device *dev;
+ struct device class_dev;
struct list_head list;
const struct rtc_class_ops *ops;
diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h
index 5b6de7bb87..82c2930ce8 100644
--- a/include/linux/scmi_protocol.h
+++ b/include/linux/scmi_protocol.h
@@ -110,11 +110,11 @@ struct scmi_perf_proto_ops {
u32 level, bool poll);
int (*level_get)(const struct scmi_protocol_handle *ph, u32 domain,
u32 *level, bool poll);
- int (*device_domain_id)(struct device_d *dev);
+ int (*device_domain_id)(struct device *dev);
int (*transition_latency_get)(const struct scmi_protocol_handle *ph,
- struct device_d *dev);
+ struct device *dev);
int (*device_opps_add)(const struct scmi_protocol_handle *ph,
- struct device_d *dev);
+ struct device *dev);
int (*freq_set)(const struct scmi_protocol_handle *ph, u32 domain,
unsigned long rate, bool poll);
int (*freq_get)(const struct scmi_protocol_handle *ph, u32 domain,
@@ -122,7 +122,7 @@ struct scmi_perf_proto_ops {
int (*est_power_get)(const struct scmi_protocol_handle *ph, u32 domain,
unsigned long *rate, unsigned long *power);
bool (*fast_switch_possible)(const struct scmi_protocol_handle *ph,
- struct device_d *dev);
+ struct device *dev);
bool (*power_scale_mw_get)(const struct scmi_protocol_handle *ph);
};
@@ -549,7 +549,7 @@ struct scmi_voltage_proto_ops {
* operations and a dedicated protocol handler
*/
struct scmi_handle {
- struct device_d *dev;
+ struct device *dev;
struct scmi_revision_info *version;
const void __must_check *
@@ -580,14 +580,14 @@ enum scmi_system_events {
struct scmi_device {
u8 protocol_id;
const char *name;
- struct device_d dev;
+ struct device dev;
struct scmi_handle *handle;
};
#define to_scmi_dev(d) container_of(d, struct scmi_device, dev)
struct scmi_device *
-scmi_device_alloc(struct device_node *np, struct device_d *parent, int protocol,
+scmi_device_alloc(struct device_node *np, struct device *parent, int protocol,
const char *name);
void scmi_device_destroy(struct scmi_device *scmi_dev);
diff --git a/include/linux/virtio.h b/include/linux/virtio.h
index 719f45c975..6f7c670bfe 100644
--- a/include/linux/virtio.h
+++ b/include/linux/virtio.h
@@ -52,7 +52,7 @@ struct virtio_device {
bool failed;
bool config_enabled;
bool config_change_pending;
- struct device_d dev;
+ struct device dev;
struct virtio_device_id id;
const struct virtio_config_ops *config;
struct list_head vqs;
@@ -61,7 +61,7 @@ struct virtio_device {
u32 status_param;
};
-static inline struct virtio_device *dev_to_virtio(struct device_d *_dev)
+static inline struct virtio_device *dev_to_virtio(struct device *_dev)
{
return container_of(_dev, struct virtio_device, dev);
}
@@ -69,7 +69,7 @@ static inline struct virtio_device *dev_to_virtio(struct device_d *_dev)
void virtio_add_status(struct virtio_device *dev, unsigned int status);
int register_virtio_device(struct virtio_device *dev);
void unregister_virtio_device(struct virtio_device *dev);
-bool is_virtio_device(struct device_d *dev);
+bool is_virtio_device(struct device *dev);
void virtio_break_device(struct virtio_device *dev);