entropy: sam: Remove unused parameter
Do not propagate unused parameter. ISR callback is already handling the given flags, there is not need to propagate it through internal calls. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
78af988546
commit
39068456c4
@ -39,10 +39,8 @@ static inline uint32_t _data(Trng * const trng)
|
||||
#endif
|
||||
}
|
||||
|
||||
static int entropy_sam_wait_ready(Trng * const trng, uint32_t flags)
|
||||
static int entropy_sam_wait_ready(Trng * const trng)
|
||||
{
|
||||
ARG_UNUSED(flags);
|
||||
|
||||
/* According to the reference manual, the generator provides
|
||||
* one 32-bit random value every 84 peripheral clock cycles.
|
||||
* MCK may not be smaller than HCLK/4, so it should not take
|
||||
@ -65,7 +63,7 @@ static int entropy_sam_wait_ready(Trng * const trng, uint32_t flags)
|
||||
|
||||
static int entropy_sam_get_entropy_internal(const struct device *dev,
|
||||
uint8_t *buffer,
|
||||
uint16_t length, uint32_t flags)
|
||||
uint16_t length)
|
||||
{
|
||||
const struct trng_sam_dev_cfg *config = dev->config;
|
||||
Trng *const trng = config->regs;
|
||||
@ -75,7 +73,7 @@ static int entropy_sam_get_entropy_internal(const struct device *dev,
|
||||
uint32_t value;
|
||||
int res;
|
||||
|
||||
res = entropy_sam_wait_ready(trng, flags);
|
||||
res = entropy_sam_wait_ready(trng);
|
||||
if (res < 0) {
|
||||
return res;
|
||||
}
|
||||
@ -94,7 +92,7 @@ static int entropy_sam_get_entropy_internal(const struct device *dev,
|
||||
static int entropy_sam_get_entropy(const struct device *dev, uint8_t *buffer,
|
||||
uint16_t length)
|
||||
{
|
||||
return entropy_sam_get_entropy_internal(dev, buffer, length, 0);
|
||||
return entropy_sam_get_entropy_internal(dev, buffer, length);
|
||||
}
|
||||
|
||||
static int entropy_sam_get_entropy_isr(const struct device *dev,
|
||||
@ -135,7 +133,7 @@ static int entropy_sam_get_entropy_isr(const struct device *dev,
|
||||
/* Allowed to busy-wait */
|
||||
int ret =
|
||||
entropy_sam_get_entropy_internal(dev,
|
||||
buffer, length, flags);
|
||||
buffer, length);
|
||||
|
||||
if (ret == 0) {
|
||||
/* Data retrieved successfully. */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user