Commit b777e3e1 authored by Sergio Paracuellos's avatar Sergio Paracuellos Committed by Greg Kroah-Hartman

staging: ks7010: move and rename DEVICE_ALIGNMENT into correct header

This commit moves DEVICE_ALIGNMENT definition into the header ks_hostif.h
which is where it is being used. This is also defined always so just
remove nosense undef definitions also and clean some preprocessor
conditional directives in hif_align_size function.
Signed-off-by: default avatarSergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 477c5eb5
...@@ -11,11 +11,6 @@ ...@@ -11,11 +11,6 @@
#ifndef _KS7010_SDIO_H #ifndef _KS7010_SDIO_H
#define _KS7010_SDIO_H #define _KS7010_SDIO_H
#ifdef DEVICE_ALIGNMENT
#undef DEVICE_ALIGNMENT
#endif
#define DEVICE_ALIGNMENT 32
/* SDIO KeyStream vendor and device */ /* SDIO KeyStream vendor and device */
#define SDIO_VENDOR_ID_KS_CODE_A 0x005b #define SDIO_VENDOR_ID_KS_CODE_A 0x005b
#define SDIO_VENDOR_ID_KS_CODE_B 0x0023 #define SDIO_VENDOR_ID_KS_CODE_B 0x0023
......
...@@ -559,6 +559,8 @@ void send_packet_complete(struct ks_wlan_private *priv, struct sk_buff *skb); ...@@ -559,6 +559,8 @@ void send_packet_complete(struct ks_wlan_private *priv, struct sk_buff *skb);
void ks_wlan_hw_wakeup_request(struct ks_wlan_private *priv); void ks_wlan_hw_wakeup_request(struct ks_wlan_private *priv);
int ks_wlan_hw_power_save(struct ks_wlan_private *priv); int ks_wlan_hw_power_save(struct ks_wlan_private *priv);
#define KS7010_SIZE_ALIGNMENT 32
static static
inline int hif_align_size(int size) inline int hif_align_size(int size)
{ {
...@@ -566,12 +568,8 @@ inline int hif_align_size(int size) ...@@ -566,12 +568,8 @@ inline int hif_align_size(int size)
if (size < 1024) if (size < 1024)
size = 1024; size = 1024;
#endif #endif
#ifdef DEVICE_ALIGNMENT return (size % KS7010_SIZE_ALIGNMENT) ? size + KS7010_SIZE_ALIGNMENT -
return (size % DEVICE_ALIGNMENT) ? size + DEVICE_ALIGNMENT - (size % KS7010_SIZE_ALIGNMENT) : size;
(size % DEVICE_ALIGNMENT) : size;
#else
return size;
#endif
} }
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment