mbox series

[v2,0/3] Use a local device pointer for hwrng drivers instead of casting constantly

Message ID 20250410152239.4146166-1-sakari.ailus@linux.intel.com (mailing list archive)
Headers show
Series Use a local device pointer for hwrng drivers instead of casting constantly | expand

Message

Sakari Ailus April 10, 2025, 3:22 p.m. UTC
Hi folks,

Clean up random number reading by storing struct device pointer to device
context struct. The changes are very similar in all three drivers.

since v2:

- Add a struct device pointer field to device context structs, don't use
  struct hwrgn priv field for the purpose anymore.

Sakari Ailus (3):
  hwrng: atmel - Add struct device pointer to device context struct
  hwrng: mtk - Add struct device pointer to device context struct
  hwrng: npcm - Add struct device pointer to device context struct

 drivers/char/hw_random/atmel-rng.c | 11 ++++++-----
 drivers/char/hw_random/mtk-rng.c   |  9 +++++----
 drivers/char/hw_random/npcm-rng.c  |  9 +++++----
 3 files changed, 16 insertions(+), 13 deletions(-)

Comments

Herbert Xu April 16, 2025, 7:58 a.m. UTC | #1
On Thu, Apr 10, 2025 at 06:22:36PM +0300, Sakari Ailus wrote:
> Hi folks,
> 
> Clean up random number reading by storing struct device pointer to device
> context struct. The changes are very similar in all three drivers.
> 
> since v2:
> 
> - Add a struct device pointer field to device context structs, don't use
>   struct hwrgn priv field for the purpose anymore.
> 
> Sakari Ailus (3):
>   hwrng: atmel - Add struct device pointer to device context struct
>   hwrng: mtk - Add struct device pointer to device context struct
>   hwrng: npcm - Add struct device pointer to device context struct
> 
>  drivers/char/hw_random/atmel-rng.c | 11 ++++++-----
>  drivers/char/hw_random/mtk-rng.c   |  9 +++++----
>  drivers/char/hw_random/npcm-rng.c  |  9 +++++----
>  3 files changed, 16 insertions(+), 13 deletions(-)
> 
> -- 
> 2.39.5

All applied.  Thanks.