device: Const-ify all device driver instance pointers
Now that device_api attribute is unmodified at runtime, as well as all the other attributes, it is possible to switch all device driver instance to be constant. A coccinelle rule is used for this: @r_const_dev_1 disable optional_qualifier @ @@ -struct device * +const struct device * @r_const_dev_2 disable optional_qualifier @ @@ -struct device * const +const struct device * Fixes #27399 Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
c8906fef79
commit
e18fcbba5a
1426 changed files with 9356 additions and 8368 deletions
|
@ -30,7 +30,7 @@ struct dma_stm32_data {
|
|||
|
||||
struct dma_stm32_config {
|
||||
struct stm32_pclken pclken;
|
||||
void (*config_irq)(struct device *dev);
|
||||
void (*config_irq)(const struct device *dev);
|
||||
bool support_m2m;
|
||||
uint32_t base;
|
||||
};
|
||||
|
@ -75,12 +75,12 @@ uint32_t stm32_dma_get_pburst(struct dma_config *config, bool source_periph);
|
|||
|
||||
#ifdef CONFIG_DMAMUX_STM32
|
||||
/* dma_stm32_ api functions are exported to the dmamux_stm32 */
|
||||
int dma_stm32_configure(struct device *dev, uint32_t id,
|
||||
int dma_stm32_configure(const struct device *dev, uint32_t id,
|
||||
struct dma_config *config);
|
||||
int dma_stm32_reload(struct device *dev, uint32_t id,
|
||||
int dma_stm32_reload(const struct device *dev, uint32_t id,
|
||||
uint32_t src, uint32_t dst, size_t size);
|
||||
int dma_stm32_start(struct device *dev, uint32_t id);
|
||||
int dma_stm32_stop(struct device *dev, uint32_t id);
|
||||
int dma_stm32_start(const struct device *dev, uint32_t id);
|
||||
int dma_stm32_stop(const struct device *dev, uint32_t id);
|
||||
#endif /* CONFIG_DMAMUX_STM32 */
|
||||
|
||||
#endif /* DMA_STM32_H_*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue