On 18/04/13 10:08, Janusz Dziedzic wrote: > Add ath10k_bmi_read32/ath10k_bmi_write32 functions > and use them in core layer when read32/write32. > > Signed-off-by: Janusz Dziedzic <janusz.dzied...@tieto.com> > --- > drivers/net/wireless/ath/ath10k/bmi.h | 10 ++++++++++ > drivers/net/wireless/ath/ath10k/core.c | 24 ++++++++++++------------ > 2 files changed, 22 insertions(+), 12 deletions(-) > > diff --git a/drivers/net/wireless/ath/ath10k/bmi.h > b/drivers/net/wireless/ath/ath10k/bmi.h > index e2bd70b..2035d5d 100644 > --- a/drivers/net/wireless/ath/ath10k/bmi.h > +++ b/drivers/net/wireless/ath/ath10k/bmi.h > @@ -191,6 +191,16 @@ int ath10k_bmi_read_memory(struct ath10k *ar, u32 > address, > void *buffer, u32 length); > int ath10k_bmi_write_memory(struct ath10k *ar, u32 address, > const void *buffer, u32 length); > +static inline int ath10k_bmi_read32(struct ath10k *ar, u32 address, > + void *buffer) > +{ > + return ath10k_bmi_read_memory(ar, address, buffer, sizeof(u32)); > +} > +static inline int ath10k_bmi_write32(struct ath10k *ar, u32 address, > + void *buffer) > +{ > + return ath10k_bmi_write_memory(ar, address, buffer, sizeof(u32)); > +}
I think these functions should do endianess converions so it is not necessary at call sites anymore. Also the buffer could be a u32* instead of a void* implicitly stating what the functions are meant to do. -- Pozdrawiam / Best regards, Michal Kazior. _______________________________________________ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel