This is helpful for finding ranges of #ifdefed code.
Signed-off-by: Jim Cromie <***@gmail.com>
---
merge.c | 215 ++++++++++++++++++++++++++++++++++------------------------------
1 file changed, 115 insertions(+), 100 deletions(-)
diff --git a/merge.c b/merge.c
index 81240c6..aefe8b5 100644
--- a/merge.c
+++ b/merge.c
@@ -335,7 +335,7 @@ static int acx_create_tx_host_desc_queue(acx_device_t *adev)
txbuf = (u8*) adev->tx.buf.txstart;
txbuf_phy = adev->tx.buf.phy;
-#if 0
+#if 0 /* tx-buffer */
/* Each tx buffer is accessed by hardware via txdesc -> txhostdesc(s)
* -> txbuffer(s). We use only one txhostdesc per txdesc, but it
* looks like acx111 is buggy: it accesses second txhostdesc (via
@@ -379,7 +379,7 @@ static int acx_create_tx_host_desc_queue(acx_device_t *adev)
}
hostdesc++;
}
-#endif
+#endif /* tx-buffer */
/* We initialize two hostdescs so that they point to adjacent
* memory areas. Thus txbuf is really just a contiguous memory
* area */
@@ -720,7 +720,7 @@ void acx_free_desc_queues(acx_device_t *adev)
adev->_dir_.host.start, adev->_dir_.host.phy); \
ACX_FREE_QUEUE(adev, adev->_dir_.buf.size, \
adev->_dir_.buf.start, adev->_dir_.buf.phy);
-#endif
+#endif // ACX_FREE_QUEUES
FN_ENTER;
@@ -972,11 +972,11 @@ end:
FN_EXIT1(result);
return result;
}
-#endif /* acx_write_eeprom() */
+#endif /* acx_write_eeprom() */
static inline void acx_read_eeprom_area(acx_device_t *adev)
{
-#if ACX_DEBUG > 1
+#if ACX_DEBUG > 1 /* in acx_read_eeprom_area() */
int offs;
u8 tmp;
@@ -985,11 +985,12 @@ static inline void acx_read_eeprom_area(acx_device_t *adev)
if (IS_MEM(adev) || IS_PCI(adev))
for (offs = 0x8c; offs < 0xb9; offs++)
acx_read_eeprom_byte(adev, offs, &tmp);
- else BUG();
+ else
+ BUG();
FN_EXIT0;
-#endif
+#endif /* ACX_DEBUG > 1 : in acx_read_eeprom_area() */
}
/*
@@ -1099,7 +1100,7 @@ fail:
* 0 success
*/
/* static */
-#if 1 // needs work, but it compiles
+#if 1 // acx_write_fw()
int acx_write_fw(acx_device_t *adev, const firmware_image_t *fw_image,
u32 offset)
{
@@ -1126,16 +1127,17 @@ int acx_write_fw(acx_device_t *adev, const firmware_image_t *fw_image,
write_reg32(adev, IO_ACX_SLV_MEM_CTL, 1); /* use autoincrement mode */
write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset); /* configure start address */
write_flush(adev);
-#endif
-#endif
- } else {
+#endif /* FW_NO_AUTO_INCREMENT */
+#endif /* NOPE mem.c only, all else same */
+ }
+ else {
#if FW_NO_AUTO_INCREMENT
write_reg32(adev, IO_ACX_SLV_MEM_CTL, 0); /* use basic mode */
#else
write_reg32(adev, IO_ACX_SLV_MEM_CTL, 1); /* use autoincrement mode */
write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset); /* configure start address */
write_flush(adev);
-#endif
+#endif /* FW_NO_AUTO_INCREMENT */
}
len = 0;
size = le32_to_cpu(fw_image->size) & (~3);
@@ -1151,18 +1153,18 @@ int acx_write_fw(acx_device_t *adev, const firmware_image_t *fw_image,
write_reg32(adev, IO_ACX_SLV_MEM_ADDR,
offset + len - 4);
write_flush(adev);
-#endif
+#endif /* FW_NO_AUTO_INCREMENT */
write_reg32(adev, IO_ACX_SLV_MEM_DATA, v32);
write_flush(adev);
} else {
-#ifdef NOPE // mem.c
+#ifdef NOPE
#if FW_NO_AUTO_INCREMENT
write_reg32(adev, IO_ACX_SLV_MEM_ADDR, offset + len - 4);
write_flush(adev);
-#endif
+#endif /* FW_NO_AUTO_INCREMENT */
write_reg32(adev, IO_ACX_SLV_MEM_DATA, v32);
write_flush(adev);
-#endif
+#endif /* NOPE */
/* mem.c only, til .. */
write_slavemem32(adev, offset + len - 4, v32);
@@ -1189,7 +1191,7 @@ int acx_write_fw(acx_device_t *adev, const firmware_image_t *fw_image,
FN_EXIT1(sum != le32_to_cpu(fw_image->chksum));
return (sum != le32_to_cpu(fw_image->chksum));
}
-#endif
+#endif // acx_write_fw()
/*
* acx_validate_fw
@@ -1283,7 +1285,7 @@ int acx_validate_fw(acx_device_t *adev, const firmware_image_t *fw_image,
return result;
}
-#if 1 /* used for mem.c only */
+#if 1 /* used for mem.c only */
#ifdef PATCH_AROUND_BAD_SPOTS
/*
@@ -1298,7 +1300,7 @@ static const u32 patch[] = {
0x602e6018, 0x23036468, 0x480203db, 0x60ca6003, 0xbdf0750a,
0xffff0808
};
-#endif // PATCH_AROUND_BAD_SPOTS
+#endif // PATCH_AROUND_BAD_SPOTS
static int _acx_upload_fw(acx_device_t *adev, char *filename)
{
@@ -1312,7 +1314,7 @@ static int _acx_upload_fw(acx_device_t *adev, char *filename)
#ifdef PATCH_AROUND_BAD_SPOTS
u32 offset;
int i;
-#endif
+#endif /* PATCH_AROUND_BAD_SPOTS */
FN_ENTER;
@@ -1397,7 +1399,7 @@ static int _acx_upload_fw(acx_device_t *adev, char *filename)
}
acxmem_unlock();
-#endif // PATCH_AROUND_BAD_SPOTS
+#endif // PATCH_AROUND_BAD_SPOTS
} // IS_MEM
vfree(fw_image);
@@ -1491,14 +1493,14 @@ void acx_show_card_eeprom_id(acx_device_t *adev)
}
#else
static inline void acx_show_card_eeprom_id(acx_device_t *adev) {}
-#endif /* NONESSENTIAL_FEATURES */
+#endif /* NONESSENTIAL_FEATURES */
/*
* BOM CMDs (Control Path)
* ==================================================
*/
-#if 1 //
+#if 1 /* acx_read_cmd_type_status() */
u32 acx_read_cmd_type_status(acx_device_t *adev)
{
u32 cmd_type, cmd_status;
@@ -1518,7 +1520,7 @@ u32 acx_read_cmd_type_status(acx_device_t *adev)
FN_EXIT1(cmd_status);
return cmd_status;
}
-#endif // acxmem_read_cmd_type_status()
+#endif /* acx_read_cmd_type_status() */
/* static inline */
void acx_write_cmd_type_status(acx_device_t *adev, u16 type, u16 status)
@@ -1583,7 +1585,7 @@ static void acx_init_mboxes(acx_device_t *adev)
* Also ifup/down works more reliable on the mem device.
*
*/
-#if 0 // needs work
+#if 0 /* acxmem_issue_cmd_timeo_debug() */
int acxmem_issue_cmd_timeo_debug(acx_device_t *adev, unsigned cmd,
void *buffer, unsigned buflen,
unsigned cmd_timeout, const char *cmdstr)
@@ -1809,7 +1811,7 @@ int acxmem_issue_cmd_timeo_debug(acx_device_t *adev, unsigned cmd,
FN_EXIT1(NOT_OK);
return NOT_OK;
}
-#endif // acxmem_issue_cmd_timeo_debug()
+#endif /* acxmem_issue_cmd_timeo_debug() */
#define REG_ACX_VENDOR_ID 0x900
#define ACX_VENDOR_ID 0x8400104c
@@ -1826,7 +1828,7 @@ int acxmem_issue_cmd_timeo_debug(acx_device_t *adev, unsigned cmd,
* MAC will be reset
* Call context: reset_dev
*/
-#if 0 // review before restoring
+#if 0 // acxmem_reset_mac()
static void acxmem_reset_mac(acx_device_t *adev)
{
int count;
@@ -1864,7 +1866,7 @@ static void acxmem_reset_mac(acx_device_t *adev)
FN_EXIT0;
}
-#endif // acxmem_reset_mac()
+#endif // acxmem_reset_mac()
void acx_up(struct ieee80211_hw *hw)
{
@@ -1969,7 +1971,7 @@ int acx_reset_dev(acx_device_t *adev)
goto end_fail;
}
} // IS_MEM
-#if 0
+#if 0 // IO_ACX_SOR_CFG
if (read_reg16(adev, IO_ACX_SOR_CFG) & 2) {
/* eCPU most likely means "embedded CPU" */
msg = "acx: eCPU did not start after boot from flash. ";
@@ -1982,7 +1984,7 @@ int acx_reset_dev(acx_device_t *adev)
"is this fatal?\n", adev->ndev->name,
wiphy_name(adev->ieee->wiphy));
}
-#endif
+#endif // IO_ACX_SOR_CFG
/* scan, if any, is stopped now, setting corresponding IRQ bit */
(IS_MEM(adev))
@@ -2126,9 +2128,9 @@ int acx_verify_init(acx_device_t *adev)
* control field, of which only 0x02000000 has any meaning. The lower
* 19 bits are the address of the next block divided by 32.
*/
-#if 0 // none in pci
-static void acxmem_init_acx_txbuf(acx_device_t *adev) {
-
+#if 0 // acxmem_init_acx_txbuf()
+static void acxmem_init_acx_txbuf(acx_device_t *adev)
+{
/*
* acx100_s_init_memory_pools set up txbuf_start and
* txbuf_numblocks for us. All we need to do is reset the
@@ -2146,13 +2148,13 @@ static void acxmem_init_acx_txbuf(acx_device_t *adev) {
* reset, so the ACX memory is in the state we want.
*/
}
-#endif // acxmem_init_acx_txbuf()
+#endif // acxmem_init_acx_txbuf()
/*
* Most of the acx specific pieces of hardware reset.
*/
-#if 0
+#if 0 // acxmem_i_set_multicast_list()
/***********************************************************************
** acxmem_i_set_multicast_list
** FIXME: most likely needs refinement
@@ -2202,7 +2204,7 @@ static void acxmem_i_set_multicast_list(struct net_device *ndev)
* BOM Proc, Debug
* ==================================================
*/
-#if 0 // real close
+#if 0 // acxmem_proc_diag_output()
int acxmem_proc_diag_output(struct seq_file *file,
acx_device_t *adev)
{
@@ -2309,8 +2311,9 @@ int acxmem_proc_diag_output(struct seq_file *file,
(ulong) & (txdesc->AcxMemPtr));
seq_printf(file, " %04x: ", tmp);
- /* Output allocated tx-buffer chain */
-#if 1
+
+#if 1 /* Output allocated tx-buffer chain */
+
if (tmp) {
while ((tmp2 = read_slavemem32(adev, (u32) tmp))
!= 0x02000000) {
@@ -2320,7 +2323,8 @@ int acxmem_proc_diag_output(struct seq_file *file,
}
seq_printf(file, " %04x=%04x", tmp, tmp2);
}
-#endif
+#endif /* Output allocated tx-buffer chain */
+
seq_printf(file, "\n");
#if 0
@@ -2345,7 +2349,7 @@ int acxmem_proc_diag_output(struct seq_file *file,
}
}
-#if 1
+#if 1 /* Tx-buffer list dump */
/* Tx-buffer list dump */
seq_printf(file, "\n");
seq_printf(file, "* Tx-buffer list dump\n");
@@ -2365,7 +2369,7 @@ int acxmem_proc_diag_output(struct seq_file *file,
}
seq_printf(file, "\n");
/* --- */
-#endif
+#endif /* Tx-buffer list dump */
seq_printf(file, "\n"
"** Generic slave data **\n"
@@ -2396,7 +2400,7 @@ int acxmem_proc_diag_output(struct seq_file *file,
FN_EXIT0;
return 0;
}
-#endif // acxmem_proc_diag_output()
+#endif // acxmem_proc_diag_output()
/*
* BOM Rx Path
@@ -2588,7 +2592,7 @@ static int acxmem_get_txbuf_space_needed(acx_device_t *adev, unsigned int len) {
return (blocks_needed);
}
-#if 0 // acxmem_get_txdesc()
+#if 0 // acxmem_get_txdesc()
static inline
txdesc_t* acxmem_get_txdesc(acx_device_t *adev, int index)
{
@@ -2606,7 +2610,7 @@ txdesc_t* acxmem_get_txdesc(acx_device_t *adev, int index)
* sufficiently many.
*/
/* OW TODO Align with pci.c */
-#if 1 // acxmem_alloc_tx()
+#if 1 // acxmem_alloc_tx()
tx_t *acxmem_alloc_tx(acx_device_t *adev, unsigned int len) {
struct txdesc *txdesc;
unsigned head;
@@ -2725,7 +2729,7 @@ tx_t *acxmem_alloc_tx(acx_device_t *adev, unsigned int len) {
return (tx_t*) txdesc;
}
-#endif // acxmem_alloc_tx()
+#endif // acxmem_alloc_tx()
/*
* acxmem_l_dealloc_tx
@@ -2737,7 +2741,7 @@ tx_t *acxmem_alloc_tx(acx_device_t *adev, unsigned int len) {
* pointer back.
*
*/
-#if 1 // acxmem_dealloc_tx()
+#if 1 // acxmem_dealloc_tx()
void acxmem_dealloc_tx(acx_device_t *adev, tx_t *tx_opaque) {
/*
* txdesc is the address of the descriptor on the ACX.
@@ -2772,13 +2776,13 @@ void acxmem_dealloc_tx(acx_device_t *adev, tx_t *tx_opaque) {
acxmem_unlock();
}
-#endif // acxmem_dealloc_tx()
-#endif // CONFIG_ACX_MAC80211_MEM
+#endif // acxmem_dealloc_tx()
+#endif // CONFIG_ACX_MAC80211_MEM
/*
* Return an acx pointer to the next transmit data block.
*/
-#if 0 // using copy in mem.c
+#if 0 /* acxmem_allocate_acx_txbuf_space() */
static u32 acxmem_allocate_acx_txbuf_space(acx_device_t *adev, int count) {
u32 block, next, last_block;
int blocks_needed;
@@ -2840,7 +2844,7 @@ static u32 acxmem_allocate_acx_txbuf_space(acx_device_t *adev, int count) {
return block;
}
-#endif
+#endif /* acxmem_allocate_acx_txbuf_space() */
/*
* Return buffer space back to the pool by following the next pointers
@@ -2928,7 +2932,7 @@ void *_acx_get_txbuf(acx_device_t * adev, tx_t * tx_opaque)
* pre-allocated tx descrs, properly setting up transfer data and
* CTL_xxx flags according to fragment number.
*/
-#if 1 // pci version merge started
+#if 1 // pci version merge started
void _acx_tx_data(acx_device_t *adev, tx_t *tx_opaque, int len,
struct ieee80211_tx_info *info, struct sk_buff *skb)
{
@@ -3184,7 +3188,7 @@ end_of_chain:
FN_EXIT0;
}
-#endif // acxmem_tx_data()
+#endif // acxmem_tx_data()
/*
* acxmem_l_clean_txdesc
@@ -3476,10 +3480,10 @@ void acxmem_update_queue_indicator(acx_device_t *adev, int txqueue)
local_irq_restore (flags);
#endif
}
-#endif // CONFIG_ACX_MAC80211_MEM) acxmem_update_queue_indicator()
+#endif // CONFIG_ACX_MAC80211_MEM) acxmem_update_queue_indicator()
/* OW TODO See if this is usable with mac80211 */
-#if 0
+#if 0 // acxmem_i_tx_timeout()
/***********************************************************************
** acxmem_i_tx_timeout
**
@@ -3526,10 +3530,7 @@ static void acxmem_i_tx_timeout(struct net_device *ndev) {
FN_EXIT0;
}
-#endif // acxmem_i_tx_timeout()
-
-#ifdef CONFIG_ACX_MAC80211_MEM
-#endif // CONFIG_ACX_MAC80211_MEM
+#endif // acxmem_i_tx_timeout()
/*
* BOM Irq Handling, Timer
@@ -3573,7 +3574,7 @@ void acx_irq_work(struct work_struct *work)
#if IRQ_ITERATE
if (!irqmasked) break;
-#endif
+#endif /* IRQ_ITERATE */
/* HOST_INT_CMD_COMPLETE handling */
if (irqmasked & HOST_INT_CMD_COMPLETE) {
@@ -3644,7 +3645,7 @@ void acx_irq_work(struct work_struct *work)
* tx_free >= TX_START_QUEUE */
if (!acx_queue_stopped(adev->ieee))
acx_tx_queue_go(adev);
-#endif
+#endif /* IRQ_ITERATE */
/* HOST_INT_INFO */
if (irqmasked & HOST_INT_INFO)
@@ -3728,7 +3729,7 @@ void acx_irq_work(struct work_struct *work)
void acx_handle_info_irq(acx_device_t *adev)
{
-#if ACX_DEBUG
+#if ACX_DEBUG /* static const char * const info_type_msg[] */
static const char * const info_type_msg[] = {
"(unknown)",
"scan complete",
@@ -3748,7 +3749,8 @@ void acx_handle_info_irq(acx_device_t *adev)
"???",
"TKIP IV value exceeds thresh"
};
-#endif
+#endif /* ACX_DEBUG static const char * const info_type_msg[] */
+
u32 info_type, info_status;
info_type = (IS_MEM(adev))
@@ -3790,7 +3792,7 @@ void acx_set_interrupt_mask(acx_device_t *adev)
/* OW FIXME Old interrupt handler
* ---
*/
-#if 0
+#if 0 /* acxmem_interrupt() */
static irqreturn_t acxmem_interrupt(int irq, void *dev_id)
{
acx_device_t *adev = dev_id;
@@ -3840,7 +3842,8 @@ static irqreturn_t acxmem_interrupt(int irq, void *dev_id)
/* safety condition; we'll normally abort loop below
* in case no IRQ type occurred */
while (likely(--irqcount)) {
-#endif
+#endif // IRQ_ITERATE
+
/* ACK all IRQs ASAP */
write_reg16(adev, IO_ACX_IRQ_ACK, 0xffff);
@@ -3870,10 +3873,11 @@ static irqreturn_t acxmem_interrupt(int irq, void *dev_id)
* some reason...) */
if (adev->tx_free <= TX_START_CLEAN) {
#if TX_CLEANUP_IN_SOFTIRQ
- acx_schedule_task(adev, ACX_AFTER_IRQ_TX_CLEANUP);
+ acx_schedule_task(adev,
+ ACX_AFTER_IRQ_TX_CLEANUP);
#else
acx_tx_clean_txdesc(adev);
-#endif
+#endif /* TX_CLEANUP_IN_SOFTIRQ */
}
}
@@ -3883,7 +3887,8 @@ static irqreturn_t acxmem_interrupt(int irq, void *dev_id)
if (irqtype & HOST_INT_CMD_COMPLETE) {
log(L_IRQ, "got Command_Complete IRQ\n");
/* save the state for the running issue_cmd() */
- SET_BIT(adev->irq_status, HOST_INT_CMD_COMPLETE);
+ SET_BIT(adev->irq_status,
+ HOST_INT_CMD_COMPLETE);
}
if (irqtype & HOST_INT_INFO) {
acx_handle_info_irq(adev);
@@ -3891,9 +3896,11 @@ static irqreturn_t acxmem_interrupt(int irq, void *dev_id)
if (irqtype & HOST_INT_SCAN_COMPLETE) {
log(L_IRQ, "got Scan_Complete IRQ\n");
/* need to do that in process context */
- acx_schedule_task(adev, ACX_AFTER_IRQ_COMPLETE_SCAN);
+ acx_schedule_task(adev,
+ ACX_AFTER_IRQ_COMPLETE_SCAN);
/* remember that fw is not scanning anymore */
- SET_BIT(adev->irq_status, HOST_INT_SCAN_COMPLETE);
+ SET_BIT(adev->irq_status,
+ HOST_INT_SCAN_COMPLETE);
}
}
@@ -3927,7 +3934,8 @@ static irqreturn_t acxmem_interrupt(int irq, void *dev_id)
if (!irqtype)
break;
- if (unlikely(++adev->irq_loops_this_jiffy> MAX_IRQLOOPS_PER_JIFFY)) {
+ if (unlikely(++adev->irq_loops_this_jiffy
+ > MAX_IRQLOOPS_PER_JIFFY)) {
pr_err("acx: too many interrupts per jiffy!\n");
/* Looks like card floods us with IRQs! Try to
* stop that */
@@ -3938,7 +3946,7 @@ static irqreturn_t acxmem_interrupt(int irq, void *dev_id)
break;
}
}
-#endif
+#endif /* IRQ_ITERATE */
/* OW 20091129 TODO Currently breaks mem.c ...
* If sleeping is required like for update card settings, this
@@ -3948,11 +3956,13 @@ static irqreturn_t acxmem_interrupt(int irq, void *dev_id)
*/
/* OW TODO */
-#if 0
+#if 0 /* call update_link_quality_led() */
+
/* Routine to perform blink with range */
if (unlikely(adev->led_power == 2))
update_link_quality_led(adev);
-#endif
+
+#endif /* call update_link_quality_led() */
/* handled: */
/* write_flush(adev); - not needed, last op was read anyway */
@@ -3965,7 +3975,7 @@ static irqreturn_t acxmem_interrupt(int irq, void *dev_id)
FN_EXIT0;
return IRQ_NONE;
}
-#endif
+#endif /* acxmem_interrupt() */
/* --- */
@@ -4075,8 +4085,9 @@ INLINE_IO int acxmem_adev_present(acx_device_t *adev)
}
/* OW TODO */
-#if 0
-static void update_link_quality_led(acx_device_t *adev) {
+#if 0 /* update_link_quality_led() */
+static void update_link_quality_led(acx_device_t *adev)
+{
int qual;
qual = acx_signal_determine_quality(adev->wstats.qual.level,
@@ -4091,7 +4102,7 @@ static void update_link_quality_led(acx_device_t *adev) {
adev->brange_time_last_state_change = jiffies;
}
}
-#endif
+#endif /* update_link_quality_led() */
/*
@@ -4100,10 +4111,11 @@ static void update_link_quality_led(acx_device_t *adev) {
*/
/* OW TODO Not used in pci either !? */
-#if 0
+#if 0 /* acx111pci_ioctl_info() */
int acx111pci_ioctl_info(struct ieee80211_hw *hw, struct iw_request_info *info,
- struct iw_param *vwrq, char *extra) {
-#if ACX_DEBUG > 1
+ struct iw_param *vwrq, char *extra)
+{
+#if ACX_DEBUG > 1 /* in acx111pci_ioctl_info body */
acx_device_t *adev = ieee2adev(hw);
rxdesc_t *rxdesc;
@@ -4381,12 +4393,12 @@ int acx111pci_ioctl_info(struct ieee80211_hw *hw, struct iw_request_info *info,
end_ok:
acx_sem_unlock(adev);
-#endif /* ACX_DEBUG */
+#endif /* ACX_DEBUG > 1 in acx111pci_ioctl_info body */
return OK;
}
-/***********************************************************************
- */
+/********************************************************************/
+
int acx100mem_ioctl_set_phy_amp_bias(struct ieee80211_hw *hw,
struct iw_request_info *info,
struct iw_param *vwrq, char *extra) {
@@ -4429,7 +4441,7 @@ int acx100mem_ioctl_set_phy_amp_bias(struct ieee80211_hw *hw,
acx_sem_unlock(adev);
return OK;
}
-#endif
+#endif /* acx111pci_ioctl_info() */
void acx_delete_dma_regions(acx_device_t *adev)
{
@@ -4476,7 +4488,7 @@ void acx_delete_dma_regions(acx_device_t *adev)
* pdev - ptr to pci device structure containing info about pci configuration
* id - ptr to the device id entry that matched this device
*/
-#if 0 // non-trivial diffs vs pci
+#if 0 /* acxmem_probe() */
static int __devinit acxmem_probe(struct platform_device *pdev) {
acx_device_t *adev = NULL;
@@ -4497,7 +4509,8 @@ static int __devinit acxmem_probe(struct platform_device *pdev) {
ieee = ieee80211_alloc_hw(sizeof(struct acx_device), &acxmem_hw_ops);
if (!ieee) {
- pr_acx("could not allocate ieee80211 structure %s\n", pdev->name);
+ pr_acx("could not allocate ieee80211 structure %s\n",
+ pdev->name);
goto fail_ieee80211_alloc_hw;
}
SET_IEEE80211_DEV(ieee, &pdev->dev);
@@ -4616,7 +4629,8 @@ static int __devinit acxmem_probe(struct platform_device *pdev) {
IRQF_SHARED,
KBUILD_MODNAME,
adev)) {
- pr_acx("%s: request_irq FAILED\n", wiphy_name(adev->ieee->wiphy));
+ pr_acx("%s: request_irq FAILED\n",
+ wiphy_name(adev->ieee->wiphy));
result = -EAGAIN;
goto fail_request_irq;
}
@@ -4702,7 +4716,7 @@ static int __devinit acxmem_probe(struct platform_device *pdev) {
#if CMD_DISCOVERY
great_inquisitor(adev);
-#endif
+#endif /* CMD_DISCOVERY */
result = OK;
goto done;
@@ -4737,7 +4751,7 @@ static int __devinit acxmem_probe(struct platform_device *pdev) {
FN_EXIT1(result);
return result;
}
-#endif
+#endif /* acxmem_probe() */
/*
* acxmem_e_remove
@@ -4747,7 +4761,7 @@ static int __devinit acxmem_probe(struct platform_device *pdev) {
*
* pdev - ptr to PCI device structure containing info about pci configuration
*/
-#if 0 // close, but defer merge
+#if 0 /* acxmem_remove() */
static int __devexit acxmem_remove(struct platform_device *pdev)
{
struct ieee80211_hw *hw = (struct ieee80211_hw *)
@@ -4783,7 +4797,7 @@ static int __devexit acxmem_remove(struct platform_device *pdev)
* not possible currently, since not supported by all
* firmware versions */
acx_issue_cmd(adev, ACX100_CMD_SLEEP, NULL, 0);
-#endif
+#endif /* REDUNDANT */
acxmem_lock();
@@ -4840,9 +4854,9 @@ static int __devexit acxmem_remove(struct platform_device *pdev)
return(0);
}
-#endif
+#endif /* acxmem_remove() */
-#if 0 // til-end
+#if 0 /* CONFIG_PM not ready */
/*
* TODO: PM code needs to be fixed / debugged / tested.
*/
@@ -4940,7 +4954,7 @@ static int acxmem_e_resume(struct platform_device *pdev)
FN_EXIT0;
return OK;
}
-#endif /* CONFIG_PM */
+#endif /* CONFIG_PM */
static struct platform_driver acxmem_driver = {
@@ -4953,7 +4967,7 @@ static struct platform_driver acxmem_driver = {
#ifdef CONFIG_PM
.suspend = acxmem_e_suspend,
.resume = acxmem_e_resume
-#endif /* CONFIG_PM */
+#endif /* CONFIG_PM */
};
/*
@@ -4966,20 +4980,21 @@ int __init acxmem_init_module(void) {
FN_ENTER;
-#if (ACX_IO_WIDTH==32)
+#if (ACX_IO_WIDTH == 32)
pr_acx("compiled to use 32bit I/O access. "
"I/O timing issues might occur, such as "
"non-working firmware upload. Report them\n");
#else
pr_acx("compiled to use 16bit I/O access only "
"(compatibility mode)\n");
-#endif
+#endif /* (ACX_IO_WIDTH == 32) */
#ifdef __LITTLE_ENDIAN
#define ENDIANNESS_STRING "acx: running on a little-endian CPU\n"
#else
#define ENDIANNESS_STRING "acx: running on a BIG-ENDIAN CPU\n"
-#endif
+#endif /* __LITTLE_ENDIAN */
+
log(L_INIT,
ENDIANNESS_STRING
"acx: Slave-memory module initialized, "
@@ -5010,5 +5025,5 @@ MODULE_AUTHOR( "Todd Blumer <***@sdgsystems.com>" );
MODULE_DESCRIPTION( "ACX Slave Memory Driver" );
MODULE_LICENSE( "GPL" );
-#endif // til-end
-#endif /* defined CONFIG_ACX_MAC80211_PCI || defined CONFIG_ACX_MAC80211_MEM */
+#endif /* CONFIG_PM not ready */
+#endif /* CONFIG_ACX_MAC80211_PCI || CONFIG_ACX_MAC80211_MEM */
--
1.7.10.1.487.ga3935e6