Commit 8450b99a authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] #if abuses in drivers/*

Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 0f173da3
......@@ -898,7 +898,7 @@ static int ll_do_qic_cmd(int cmd, time_t timeout)
printk(TPQIC02_NAME ": ll_do_qic_cmd(%x, %ld) failed\n", cmd, (long) timeout);
return -EIO;
}
#if OBSOLETE
#ifdef OBSOLETE
/* wait for ready since it may not be active immediately after reading status */
while ((inb_p(QIC02_STAT_PORT) & QIC02_STAT_READY) != 0)
cpu_relax();
......@@ -1419,7 +1419,7 @@ static int start_dma(short mode, unsigned long bytes_todo)
if (stat != TE_OK)
return stat;
#if OBSOLETE
#ifdef OBSOLETE
/************* not needed iff rd_status() would wait for ready!!!!!! **********/
if (wait_for_ready(TIM_S) != TE_OK) { /*** not sure this is needed ***/
tpqputs(TPQD_ALWAYS, "wait_for_ready failed in start_dma");
......
......@@ -158,11 +158,11 @@ static unsigned int get_time_pit(void)
return count;
}
#elif __x86_64__
#elif defined(__x86_64__)
#define GET_TIME(x) rdtscl(x)
#define DELTA(x,y) ((y)-(x))
#define TIME_NAME "TSC"
#elif __alpha__
#elif defined(__alpha__)
#define GET_TIME(x) do { x = get_cycles(); } while (0)
#define DELTA(x,y) ((y)-(x))
#define TIME_NAME "PCC"
......
......@@ -40,7 +40,7 @@ ReadReg(struct IsdnCardState *cs, int data, u_char reg)
byteout(cs->hw.hfcD.addr | 1, reg);
}
ret = bytein(cs->hw.hfcD.addr);
#if HFC_REG_DEBUG
#ifdef HFC_REG_DEBUG
if (cs->debug & L1_DEB_HSCX_FIFO && (data != 2))
debugl1(cs, "t3c RD %02x %02x", reg, ret);
#endif
......@@ -58,7 +58,7 @@ WriteReg(struct IsdnCardState *cs, int data, u_char reg, u_char value)
}
if (data)
byteout(cs->hw.hfcD.addr, value);
#if HFC_REG_DEBUG
#ifdef HFC_REG_DEBUG
if (cs->debug & L1_DEB_HSCX_FIFO && (data != HFCD_DATA_NODEB))
debugl1(cs, "t3c W%c %02x %02x", data ? 'D' : 'C', reg, value);
#endif
......
......@@ -623,7 +623,7 @@ static void ph_connect(struct st5481_adapter *adapter)
st5481_usb_device_ctrl_msg(adapter, FFMSK_D, 0xfc, NULL, NULL);
st5481_in_mode(d_in, L1_MODE_HDLC);
#if LOOPBACK
#ifdef LOOPBACK
// Turn loopback on (data sent on B and D looped back)
st5481_usb_device_ctrl_msg(cs, LBB, 0x04, NULL, NULL);
#endif
......
......@@ -75,7 +75,7 @@ static int pcm20_getflags(struct pcm20_device *dev, __u32 *flags, __u16 *signal)
if ((i=aci_rw_cmd(ACI_READ_TUNERSTATION, -1, -1))<0)
return i;
#if DEBUG
#ifdef DEBUG
printk("check_sig: 0x%x\n", i);
#endif
if (i & 0x80) {
......@@ -107,7 +107,7 @@ static int pcm20_getflags(struct pcm20_device *dev, __u32 *flags, __u16 *signal)
if ((i=aci_rds_cmd(RDS_RXVALUE, &buf, 1))<0)
return i;
#if DEBUG
#ifdef DEBUG
printk("rds-signal: %d\n", buf);
#endif
if (buf > 15) {
......@@ -172,7 +172,7 @@ static int pcm20_do_ioctl(struct inode *inode, struct file *file,
unsigned long *freq = arg;
pcm20->freq = *freq;
i=pcm20_setfreq(pcm20, pcm20->freq);
#if DEBUG
#ifdef DEBUG
printk("First view (setfreq): 0x%x\n", i);
#endif
return i;
......
......@@ -324,7 +324,7 @@ int saa7134_buffer_queue(struct saa7134_dev *dev,
struct saa7134_buf *buf)
{
struct saa7134_buf *next = NULL;
#if DEBUG_SPINLOCKS
#ifdef DEBUG_SPINLOCKS
BUG_ON(!spin_is_locked(&dev->slock));
#endif
......@@ -353,7 +353,7 @@ void saa7134_buffer_finish(struct saa7134_dev *dev,
struct saa7134_dmaqueue *q,
unsigned int state)
{
#if DEBUG_SPINLOCKS
#ifdef DEBUG_SPINLOCKS
BUG_ON(!spin_is_locked(&dev->slock));
#endif
dprintk("buffer_finish %p\n",q->curr);
......@@ -370,7 +370,7 @@ void saa7134_buffer_next(struct saa7134_dev *dev,
{
struct saa7134_buf *buf,*next = NULL;
#if DEBUG_SPINLOCKS
#ifdef DEBUG_SPINLOCKS
BUG_ON(!spin_is_locked(&dev->slock));
#endif
BUG_ON(NULL != q->curr);
......@@ -427,7 +427,7 @@ int saa7134_set_dmabits(struct saa7134_dev *dev)
enum v4l2_field cap = V4L2_FIELD_ANY;
enum v4l2_field ov = V4L2_FIELD_ANY;
#if DEBUG_SPINLOCKS
#ifdef DEBUG_SPINLOCKS
BUG_ON(!spin_is_locked(&dev->slock));
#endif
......
......@@ -1313,7 +1313,7 @@ extern struct aac_common aac_config;
* only used for debugging.
*/
#if DBG
#ifdef DBG
#define FIB_COUNTER_INCREMENT(counter) (counter)++
#else
#define FIB_COUNTER_INCREMENT(counter)
......
......@@ -173,7 +173,7 @@ static void ahd_handle_devreset(struct ahd_softc *ahd,
struct ahd_devinfo *devinfo,
u_int lun, cam_status status,
char *message, int verbose_level);
#if AHD_TARGET_MODE
#ifdef AHD_TARGET_MODE
static void ahd_setup_target_msgin(struct ahd_softc *ahd,
struct ahd_devinfo *devinfo,
struct scb *scb);
......@@ -1190,7 +1190,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat)
ahd->msgin_index = 0;
}
}
#if AHD_TARGET_MODE
#ifdef AHD_TARGET_MODE
else {
if (bus_phase == P_MESGOUT) {
ahd->msg_type =
......@@ -5303,7 +5303,7 @@ ahd_free(struct ahd_softc *ahd)
tstate = ahd->enabled_targets[i];
if (tstate != NULL) {
#if AHD_TARGET_MODE
#ifdef AHD_TARGET_MODE
int j;
for (j = 0; j < AHD_NUM_LUNS; j++) {
......@@ -5319,7 +5319,7 @@ ahd_free(struct ahd_softc *ahd)
free(tstate, M_DEVBUF);
}
}
#if AHD_TARGET_MODE
#ifdef AHD_TARGET_MODE
if (ahd->black_hole != NULL) {
xpt_free_path(ahd->black_hole->path);
free(ahd->black_hole, M_DEVBUF);
......@@ -6575,7 +6575,7 @@ ahd_chip_init(struct ahd_softc *ahd)
ahd_outb(ahd, CLRSINT3, NTRAMPERR|OSRAMPERR);
ahd_outb(ahd, CLRINT, CLRSCSIINT);
#if NEEDS_MORE_TESTING
#ifdef NEEDS_MORE_TESTING
/*
* Always enable abort on incoming L_Qs if this feature is
* supported. We use this to catch invalid SCB references.
......@@ -7157,7 +7157,7 @@ ahd_match_scb(struct ahd_softc *ahd, struct scb *scb, int target,
if (match != 0)
match = ((lun == slun) || (lun == CAM_LUN_WILDCARD));
if (match != 0) {
#if AHD_TARGET_MODE
#ifdef AHD_TARGET_MODE
int group;
group = XPT_FC_GROUP(scb->io_ctx->ccb_h.func_code);
......@@ -7768,7 +7768,7 @@ ahd_reset_channel(struct ahd_softc *ahd, char channel, int initiate_reset)
/* Make sure the sequencer is in a safe location. */
ahd_clear_critical_section(ahd);
#if AHD_TARGET_MODE
#ifdef AHD_TARGET_MODE
if ((ahd->flags & AHD_TARGETROLE) != 0) {
ahd_run_tqinfifo(ahd, /*paused*/TRUE);
}
......
......@@ -4881,7 +4881,7 @@ aic7xxx_handle_seqint(struct aic7xxx_host *p, unsigned char intstat)
}
break;
#if AIC7XXX_NOT_YET
#ifdef AIC7XXX_NOT_YET
case TRACEPOINT2:
{
printk(INFO_LEAD "Tracepoint #2 reached.\n", p->host_no,
......
......@@ -840,7 +840,7 @@ static void find_pio_EISA(struct get_conf *buf)
u32 base;
int i;
#if CHECKPAL
#ifdef CHECKPAL
u8 pal1, pal2, pal3;
#endif
......@@ -848,7 +848,7 @@ static void find_pio_EISA(struct get_conf *buf)
if (EISAbases[i]) { /* Still a possibility ? */
base = 0x1c88 + (i * 0x1000);
#if CHECKPAL
#ifdef CHECKPAL
pal1 = inb((u16) base - 8);
pal2 = inb((u16) base - 7);
pal3 = inb((u16) base - 6);
......@@ -868,7 +868,7 @@ static void find_pio_EISA(struct get_conf *buf)
}
/* Nothing found here so we take it from the list */
EISAbases[i] = 0;
#if CHECKPAL
#ifdef CHECKPAL
}
#endif
}
......@@ -929,7 +929,7 @@ static void find_pio_PCI(struct get_conf *buf)
EISAbases[x] = 0;
}
}
#if CHECK_BLINK
#ifdef CHECK_BLINK
else if (check_blink_state(base)) {
printk("eata_pio: HBA is in BLINK state.\n" "Consult your HBAs manual to correct this.\n");
}
......
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