drivers: device: do not reuse tag name 'device'
Do not reuse tag name (misra rule 5.7). Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
a86505b450
commit
5d6c219210
47 changed files with 118 additions and 117 deletions
|
@ -43,7 +43,7 @@ static inline uint32_t entropy_esp32_get_u32(void)
|
|||
return REG_READ(WDEV_RND_REG);
|
||||
}
|
||||
|
||||
static int entropy_esp32_get_entropy(const struct device *device, uint8_t *buf,
|
||||
static int entropy_esp32_get_entropy(const struct device *dev, uint8_t *buf,
|
||||
uint16_t len)
|
||||
{
|
||||
assert(buf != NULL);
|
||||
|
@ -61,7 +61,7 @@ static int entropy_esp32_get_entropy(const struct device *device, uint8_t *buf,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int entropy_esp32_init(const struct device *device)
|
||||
static int entropy_esp32_init(const struct device *dev)
|
||||
{
|
||||
/* clock initialization handled by clock manager */
|
||||
return 0;
|
||||
|
|
|
@ -84,7 +84,7 @@ static int entropy_gecko_trng_get_entropy_isr(const struct device *dev,
|
|||
}
|
||||
}
|
||||
|
||||
static int entropy_gecko_trng_init(const struct device *device)
|
||||
static int entropy_gecko_trng_init(const struct device *dev)
|
||||
{
|
||||
/* Enable the TRNG0 clock. */
|
||||
CMU_ClockEnable(cmuClock_TRNG0, true);
|
||||
|
|
|
@ -227,11 +227,11 @@ static void isr(const void *arg)
|
|||
}
|
||||
}
|
||||
|
||||
static int entropy_nrf5_get_entropy(const struct device *device, uint8_t *buf,
|
||||
static int entropy_nrf5_get_entropy(const struct device *dev, uint8_t *buf,
|
||||
uint16_t len)
|
||||
{
|
||||
/* Check if this API is called on correct driver instance. */
|
||||
__ASSERT_NO_MSG(&entropy_nrf5_data == DEV_DATA(device));
|
||||
__ASSERT_NO_MSG(&entropy_nrf5_data == DEV_DATA(dev));
|
||||
|
||||
while (len) {
|
||||
uint16_t bytes;
|
||||
|
@ -324,7 +324,7 @@ static int entropy_nrf5_get_entropy_isr(const struct device *dev,
|
|||
return cnt;
|
||||
}
|
||||
|
||||
static int entropy_nrf5_init(const struct device *device);
|
||||
static int entropy_nrf5_init(const struct device *dev);
|
||||
|
||||
static const struct entropy_driver_api entropy_nrf5_api_funcs = {
|
||||
.get_entropy = entropy_nrf5_get_entropy,
|
||||
|
@ -337,10 +337,10 @@ DEVICE_DT_INST_DEFINE(0,
|
|||
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
|
||||
&entropy_nrf5_api_funcs);
|
||||
|
||||
static int entropy_nrf5_init(const struct device *device)
|
||||
static int entropy_nrf5_init(const struct device *dev)
|
||||
{
|
||||
/* Check if this API is called on correct driver instance. */
|
||||
__ASSERT_NO_MSG(&entropy_nrf5_data == DEV_DATA(device));
|
||||
__ASSERT_NO_MSG(&entropy_nrf5_data == DEV_DATA(dev));
|
||||
|
||||
/* Locking semaphore initialized to 1 (unlocked) */
|
||||
k_sem_init(&entropy_nrf5_data.sem_lock, 1, 1);
|
||||
|
|
|
@ -249,12 +249,12 @@ static void stm32_rng_isr(const void *arg)
|
|||
}
|
||||
}
|
||||
|
||||
static int entropy_stm32_rng_get_entropy(const struct device *device,
|
||||
static int entropy_stm32_rng_get_entropy(const struct device *dev,
|
||||
uint8_t *buf,
|
||||
uint16_t len)
|
||||
{
|
||||
/* Check if this API is called on correct driver instance. */
|
||||
__ASSERT_NO_MSG(&entropy_stm32_rng_data == DEV_DATA(device));
|
||||
__ASSERT_NO_MSG(&entropy_stm32_rng_data == DEV_DATA(dev));
|
||||
|
||||
while (len) {
|
||||
uint16_t bytes;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue