aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-20 15:35:14 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-20 15:35:14 -0400
commit3c0b461e4c8fde467bd803e368d9a78ec2da5f8a (patch)
tree59406d8eac57f40ab446f0eee691e3e00bc7f1b6 /drivers
parentd4fda8db9796271ddd306583e1afa9df23ae1558 (diff)
staging: csr: remove odd pointer typedefs
No one was using CsrPtrdiff or CsrUintptr, but CsrIntptr is used in one place, so replace that with ptrdiff_t. Odds are all it really wants is a void * there, but hey, I'll play along for now. Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com> Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com> Cc: Riku Mettälä <riku.mettala@bluegiga.com> Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/csr/csr_types.h5
-rw-r--r--drivers/staging/csr/csr_wifi_hip_card_sdio_intr.c4
2 files changed, 2 insertions, 7 deletions
diff --git a/drivers/staging/csr/csr_types.h b/drivers/staging/csr/csr_types.h
index fb0f07cc4e5..76f95615033 100644
--- a/drivers/staging/csr/csr_types.h
+++ b/drivers/staging/csr/csr_types.h
@@ -26,11 +26,6 @@ extern "C" {
26#undef TRUE 26#undef TRUE
27#define TRUE (1) 27#define TRUE (1)
28 28
29/* Basic types */
30typedef ptrdiff_t CsrPtrdiff; /* Type of the result of subtracting two pointers (ISO/IEC 9899:1990 7.1.6) */
31typedef uintptr_t CsrUintptr; /* Unsigned integer large enough to hold any pointer (ISO/IEC 9899:1999 7.18.1.4) */
32typedef ptrdiff_t CsrIntptr; /* intptr_t is not defined in kernel. Use the equivalent ptrdiff_t. */
33
34/* 29/*
35 * 64-bit integers 30 * 64-bit integers
36 * 31 *
diff --git a/drivers/staging/csr/csr_wifi_hip_card_sdio_intr.c b/drivers/staging/csr/csr_wifi_hip_card_sdio_intr.c
index 8aba8281886..9f2343c2f46 100644
--- a/drivers/staging/csr/csr_wifi_hip_card_sdio_intr.c
+++ b/drivers/staging/csr/csr_wifi_hip_card_sdio_intr.c
@@ -1740,7 +1740,7 @@ static CsrResult process_bulk_data_command(card_t *card, const u8 *cmdptr,
1740 /* if os_data_ptr is not 4-byte aligned, then allocate a new buffer and copy data 1740 /* if os_data_ptr is not 4-byte aligned, then allocate a new buffer and copy data
1741 to new buffer to ensure the address passed to unifi_bulk_rw is 4-byte aligned */ 1741 to new buffer to ensure the address passed to unifi_bulk_rw is 4-byte aligned */
1742 1742
1743 if (len != 0 && (dir == UNIFI_SDIO_WRITE) && (((CsrIntptr)bdslot->os_data_ptr + offset) & 3)) 1743 if (len != 0 && (dir == UNIFI_SDIO_WRITE) && (((ptrdiff_t)bdslot->os_data_ptr + offset) & 3))
1744 { 1744 {
1745 host_bulk_data_slot = CsrMemAllocDma(len); 1745 host_bulk_data_slot = CsrMemAllocDma(len);
1746 1746
@@ -1799,7 +1799,7 @@ static CsrResult process_bulk_data_command(card_t *card, const u8 *cmdptr,
1799 1799
1800#ifdef CSR_WIFI_ALIGNMENT_WORKAROUND 1800#ifdef CSR_WIFI_ALIGNMENT_WORKAROUND
1801 /* moving this check before we clear host data slot */ 1801 /* moving this check before we clear host data slot */
1802 if ((len != 0) && (dir == UNIFI_SDIO_WRITE) && (((CsrIntptr)bdslot->os_data_ptr + offset) & 3)) 1802 if ((len != 0) && (dir == UNIFI_SDIO_WRITE) && (((ptrdiff_t)bdslot->os_data_ptr + offset) & 3))
1803 { 1803 {
1804 CsrMemFreeDma(host_bulk_data_slot); 1804 CsrMemFreeDma(host_bulk_data_slot);
1805 } 1805 }