@@ -42,7 +42,7 @@
* $FreeBSD$
*/
-#ifdef __linux__
+#ifdef __KERNEL__
#include "aic7xxx_osm.h"
#include "aic7xxx_inline.h"
#include "aic7xxx_93cx6.h"
@@ -607,7 +607,7 @@ struct scb {
ahd_io_ctx_t io_ctx;
struct ahd_softc *ahd_softc;
scb_flag flags;
-#ifndef __linux__
+#ifndef __KERNEL__
bus_dmamap_t dmamap;
#endif
struct scb_platform_data *platform_data;
@@ -1056,7 +1056,7 @@ struct ahd_completion
struct ahd_softc {
bus_space_tag_t tags[2];
bus_space_handle_t bshs[2];
-#ifndef __linux__
+#ifndef __KERNEL__
bus_dma_tag_t buffer_dmat; /* dmat for buffer I/O */
#endif
struct scb_data scb_data;
@@ -40,7 +40,7 @@
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.c#250 $
*/
-#ifdef __linux__
+#ifdef __KERNEL__
#include "aic79xx_osm.h"
#include "aic79xx_inline.h"
#include "aicasm/aicasm_insformat.h"
@@ -6172,7 +6172,7 @@ ahd_free(struct ahd_softc *ahd)
case 2:
ahd_dma_tag_destroy(ahd, ahd->shared_data_dmat);
case 1:
-#ifndef __linux__
+#ifndef __KERNEL__
ahd_dma_tag_destroy(ahd, ahd->buffer_dmat);
#endif
break;
@@ -6180,7 +6180,7 @@ ahd_free(struct ahd_softc *ahd)
break;
}
-#ifndef __linux__
+#ifndef __KERNEL__
ahd_dma_tag_destroy(ahd, ahd->parent_dmat);
#endif
ahd_platform_free(ahd);
@@ -6934,7 +6934,7 @@ ahd_alloc_scbs(struct ahd_softc *ahd)
for (i = 0; i < newcount; i++) {
struct scb_platform_data *pdata;
u_int col_tag;
-#ifndef __linux__
+#ifndef __KERNEL__
int error;
#endif
@@ -6970,7 +6970,7 @@ ahd_alloc_scbs(struct ahd_softc *ahd)
next_scb->sg_list_busaddr += sizeof(struct ahd_dma_seg);
next_scb->ahd_softc = ahd;
next_scb->flags = SCB_FLAG_NONE;
-#ifndef __linux__
+#ifndef __KERNEL__
error = ahd_dmamap_create(ahd, ahd->buffer_dmat, /*flags*/0,
&next_scb->dmamap);
if (error != 0) {
@@ -7091,7 +7091,7 @@ ahd_init(struct ahd_softc *ahd)
if ((AHD_TMODE_ENABLE & (0x1 << ahd->unit)) == 0)
ahd->features &= ~AHD_TARGETMODE;
-#ifndef __linux__
+#ifndef __KERNEL__
/* DMA tag for mapping buffers into device visible space. */
if (ahd_dma_tag_create(ahd, ahd->parent_dmat, /*alignment*/1,
/*boundary*/BUS_SPACE_MAXADDR_32BIT + 1,
@@ -41,7 +41,7 @@
* $Id: //depot/aic7xxx/aic7xxx/aic79xx_pci.c#92 $
*/
-#ifdef __linux__
+#ifdef __KERNEL__
#include "aic79xx_osm.h"
#include "aic79xx_inline.h"
#else
@@ -568,7 +568,7 @@ struct scb {
ahc_io_ctx_t io_ctx;
struct ahc_softc *ahc_softc;
scb_flag flags;
-#ifndef __linux__
+#ifndef __KERNEL__
bus_dmamap_t dmamap;
#endif
struct scb_platform_data *platform_data;
@@ -906,7 +906,7 @@ typedef void ahc_callback_t (void *);
struct ahc_softc {
bus_space_tag_t tag;
bus_space_handle_t bsh;
-#ifndef __linux__
+#ifndef __KERNEL__
bus_dma_tag_t buffer_dmat; /* dmat for buffer I/O */
#endif
struct scb_data *scb_data;
@@ -64,7 +64,7 @@
* bit to be sent from the chip.
*/
-#ifdef __linux__
+#ifdef __KERNEL__
#include "aic7xxx_osm.h"
#include "aic7xxx_inline.h"
#include "aic7xxx_93cx6.h"
@@ -40,7 +40,7 @@
* $Id: //depot/aic7xxx/aic7xxx/aic7xxx.c#155 $
*/
-#ifdef __linux__
+#ifdef __KERNEL__
#include "aic7xxx_osm.h"
#include "aic7xxx_inline.h"
#include "aicasm/aicasm_insformat.h"
@@ -4509,7 +4509,7 @@ ahc_free(struct ahc_softc *ahc)
case 2:
ahc_dma_tag_destroy(ahc, ahc->shared_data_dmat);
case 1:
-#ifndef __linux__
+#ifndef __KERNEL__
ahc_dma_tag_destroy(ahc, ahc->buffer_dmat);
#endif
break;
@@ -4517,7 +4517,7 @@ ahc_free(struct ahc_softc *ahc)
break;
}
-#ifndef __linux__
+#ifndef __KERNEL__
ahc_dma_tag_destroy(ahc, ahc->parent_dmat);
#endif
ahc_platform_free(ahc);
@@ -5005,7 +5005,7 @@ ahc_alloc_scbs(struct ahc_softc *ahc)
newcount = min(newcount, (AHC_SCB_MAX_ALLOC - scb_data->numscbs));
for (i = 0; i < newcount; i++) {
struct scb_platform_data *pdata;
-#ifndef __linux__
+#ifndef __KERNEL__
int error;
#endif
pdata = kmalloc(sizeof(*pdata), GFP_ATOMIC);
@@ -5021,7 +5021,7 @@ ahc_alloc_scbs(struct ahc_softc *ahc)
next_scb->sg_list_phys = physaddr + sizeof(struct ahc_dma_seg);
next_scb->ahc_softc = ahc;
next_scb->flags = SCB_FREE;
-#ifndef __linux__
+#ifndef __KERNEL__
error = ahc_dmamap_create(ahc, ahc->buffer_dmat, /*flags*/0,
&next_scb->dmamap);
if (error != 0)
@@ -5325,7 +5325,7 @@ ahc_init(struct ahc_softc *ahc)
if ((AHC_TMODE_ENABLE & (0x1 << ahc->unit)) == 0)
ahc->features &= ~AHC_TARGETMODE;
-#ifndef __linux__
+#ifndef __KERNEL__
/* DMA tag for mapping buffers into device visible space. */
if (ahc_dma_tag_create(ahc, ahc->parent_dmat, /*alignment*/1,
/*boundary*/BUS_SPACE_MAXADDR_32BIT + 1,
@@ -42,7 +42,7 @@
* $Id: //depot/aic7xxx/aic7xxx/aic7xxx_pci.c#79 $
*/
-#ifdef __linux__
+#ifdef __KERNEL__
#include "aic7xxx_osm.h"
#include "aic7xxx_inline.h"
#include "aic7xxx_93cx6.h"
@@ -42,7 +42,7 @@
* $FreeBSD$
*/
-#ifdef __linux__
+#ifdef __KERNEL__
#include "../queue.h"
#else
#include <sys/queue.h>
@@ -52,7 +52,7 @@
#include <string.h>
#include <sysexits.h>
-#ifdef __linux__
+#ifdef __KERNEL__
#include "../queue.h"
#else
#include <sys/queue.h>
@@ -52,7 +52,7 @@
#include <string.h>
#include <sysexits.h>
-#ifdef __linux__
+#ifdef __KERNEL__
#include "../queue.h"
#else
#include <sys/queue.h>
@@ -51,7 +51,7 @@
#include <stdio.h>
#include <string.h>
#include <sysexits.h>
-#ifdef __linux__
+#ifdef __KERNEL__
#include "../queue.h"
#else
#include <sys/queue.h>
@@ -51,7 +51,7 @@
#include <stdio.h>
#include <string.h>
#include <sysexits.h>
-#ifdef __linux__
+#ifdef __KERNEL__
#include "../queue.h"
#else
#include <sys/queue.h>
@@ -44,7 +44,7 @@
#include <sys/types.h>
-#ifdef __linux__
+#ifdef __KERNEL__
#include "aicdb.h"
#else
#include <db.h>
@@ -42,7 +42,7 @@
* $FreeBSD$
*/
-#ifdef __linux__
+#ifdef __KERNEL__
#include "../queue.h"
#else
#include <sys/queue.h>
Bare-metal toolchains don't define __linux__, so aic7xxx build with bare-metal toolchain is broken. Let's check __KERNEL__ definition instead of __linux__ (as this code won't be build for user-space anyway) in order to fix that. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> --- drivers/scsi/aic7xxx/aic7770.c | 2 +- drivers/scsi/aic7xxx/aic79xx.h | 4 ++-- drivers/scsi/aic7xxx/aic79xx_core.c | 12 ++++++------ drivers/scsi/aic7xxx/aic79xx_pci.c | 2 +- drivers/scsi/aic7xxx/aic7xxx.h | 4 ++-- drivers/scsi/aic7xxx/aic7xxx_93cx6.c | 2 +- drivers/scsi/aic7xxx/aic7xxx_core.c | 12 ++++++------ drivers/scsi/aic7xxx/aic7xxx_pci.c | 2 +- drivers/scsi/aic7xxx/aicasm/aicasm.h | 2 +- drivers/scsi/aic7xxx/aicasm/aicasm_gram.y | 2 +- drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.y | 2 +- drivers/scsi/aic7xxx/aicasm/aicasm_macro_scan.l | 2 +- drivers/scsi/aic7xxx/aicasm/aicasm_scan.l | 2 +- drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c | 2 +- drivers/scsi/aic7xxx/aicasm/aicasm_symbol.h | 2 +- 15 files changed, 27 insertions(+), 27 deletions(-)