[PATCH v2 06/16] staging: ks7010: move and rename DEVICE_ALIGNMENT into correct header

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: Sergio Paracuellos <sparacuellos@xxxxxxxxxxxxx>
---
 drivers/staging/ks7010/ks7010_sdio.h |  5 -----
 drivers/staging/ks7010/ks_hostif.h   | 10 ++++------
 2 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.h b/drivers/staging/ks7010/ks7010_sdio.h
index e4f56a1..3f65845 100644
--- a/drivers/staging/ks7010/ks7010_sdio.h
+++ b/drivers/staging/ks7010/ks7010_sdio.h
@@ -11,11 +11,6 @@
 #ifndef _KS7010_SDIO_H
 #define _KS7010_SDIO_H
 
-#ifdef	DEVICE_ALIGNMENT
-#undef	DEVICE_ALIGNMENT
-#endif
-#define DEVICE_ALIGNMENT 32
-
 /*  SDIO KeyStream vendor and device */
 #define SDIO_VENDOR_ID_KS_CODE_A	0x005b
 #define SDIO_VENDOR_ID_KS_CODE_B	0x0023
diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h
index b785f62..b44b6e8 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -648,6 +648,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);
 int ks_wlan_hw_power_save(struct ks_wlan_private *priv);
 
+#define KS7010_SIZE_ALIGNMENT	32
+
 static
 inline int hif_align_size(int size)
 {
@@ -655,12 +657,8 @@ inline int hif_align_size(int size)
 	if (size < 1024)
 		size = 1024;
 #endif
-#ifdef	DEVICE_ALIGNMENT
-	return (size % DEVICE_ALIGNMENT) ? size + DEVICE_ALIGNMENT -
-	    (size % DEVICE_ALIGNMENT) : size;
-#else
-	return size;
-#endif
+	return (size % KS7010_SIZE_ALIGNMENT) ? size + KS7010_SIZE_ALIGNMENT -
+	    (size % KS7010_SIZE_ALIGNMENT) : size;
 }
 
 #endif /* __KERNEL__ */
-- 
2.7.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux