zephyr/drivers/watchdog/wdt_iwdg_stm32.h
Tomasz Bursztyka 98d9b01322 device: Apply driver_api/data attributes rename everywhere
Via coccinelle:

@r_device_driver_api_and_data_1@
struct device *D;
@@
(
D->
-	driver_api
+	api
|
D->
-	driver_data
+	data
)

@r_device_driver_api_and_data_2@
expression E;
@@
(
net_if_get_device(E)->
-	driver_api
+	api
|
net_if_get_device(E)->
-	driver_data
+	data
)

And grep/sed rules for macros:

git grep -rlz 'dev)->driver_data' |
	xargs -0 sed -i 's/dev)->driver_data/dev)->data/g'

git grep -rlz 'dev->driver_data' |
	xargs -0 sed -i 's/dev->driver_data/dev->data/g'

git grep -rlz 'device->driver_data' |
	xargs -0 sed -i 's/device->driver_data/device->data/g'

Fixes #27397

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-08-11 19:30:53 +02:00

36 lines
826 B
C

/*
* Copyright (c) 2016 Open-RnD Sp. z o.o.
* Copyright (c) 2017 RnDity Sp. z o.o.
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_DRIVERS_WATCHDOG_IWDG_STM32_H_
#define ZEPHYR_DRIVERS_WATCHDOG_IWDG_STM32_H_
#include <zephyr/types.h>
/**
* @brief Driver for Independent Watchdog (IWDG) for STM32 MCUs
*
* The driver targets all STM32 SoCs. For details please refer to
* an appropriate reference manual and look for chapter called:
*
* Independent watchdog (IWDG)
*
*/
/* driver data */
struct iwdg_stm32_data {
/* IWDG peripheral instance. */
IWDG_TypeDef *Instance;
};
#define IWDG_STM32_DATA(dev) \
((struct iwdg_stm32_data * const)(dev)->data)
#define IWDG_STM32_STRUCT(dev) \
((IWDG_TypeDef *)(IWDG_STM32_DATA(dev))->Instance)
#endif /* ZEPHYR_DRIVERS_WATCHDOG_IWDG_STM32_H_ */