struct iwl_priv;
/*No matter what is m (priv, bus, trans), this will work */
-#define IWL_ERR(m, f, a...) dev_err(bus(m)->dev, f, ## a)
-#define IWL_WARN(m, f, a...) dev_warn(bus(m)->dev, f, ## a)
-#define IWL_INFO(m, f, a...) dev_info(bus(m)->dev, f, ## a)
-#define IWL_CRIT(m, f, a...) dev_crit(bus(m)->dev, f, ## a)
+#define IWL_ERR(m, f, a...) dev_err(trans(m)->dev, f, ## a)
+#define IWL_WARN(m, f, a...) dev_warn(trans(m)->dev, f, ## a)
+#define IWL_INFO(m, f, a...) dev_info(trans(m)->dev, f, ## a)
+#define IWL_CRIT(m, f, a...) dev_crit(trans(m)->dev, f, ## a)
#define iwl_print_hex_error(m, p, len) \
do { \
#define IWL_DEBUG(m, level, fmt, ...) \
do { \
if (iwl_get_debug_level((m)->shrd) & (level)) \
- dev_err(bus(m)->dev, "%c %s " fmt, \
+ dev_err(trans(m)->dev, "%c %s " fmt, \
in_interrupt() ? 'I' : 'U', __func__, \
##__VA_ARGS__); \
} while (0)
do { \
if (iwl_get_debug_level((m)->shrd) & (level) && \
net_ratelimit()) \
- dev_err(bus(m)->dev, "%c %s " fmt, \
+ dev_err(trans(m)->dev, "%c %s " fmt, \
in_interrupt() ? 'I' : 'U', __func__, \
##__VA_ARGS__); \
} while (0)
#define IWL_DEBUG_QUIET_RFKILL(p, fmt, ...) \
do { \
if (!iwl_is_rfkill(p->shrd)) \
- dev_err(bus(p)->dev, "%s%c %s " fmt, \
+ dev_err(trans(p)->dev, "%s%c %s " fmt, \
"", \
in_interrupt() ? 'I' : 'U', __func__, \
##__VA_ARGS__); \
else if (iwl_get_debug_level(p->shrd) & IWL_DL_RADIO) \
- dev_err(bus(p)->dev, "%s%c %s " fmt, \
+ dev_err(trans(p)->dev, "%s%c %s " fmt, \
"(RFKILL) ", \
in_interrupt() ? 'I' : 'U', __func__, \
##__VA_ARGS__); \
/* L1-ASPM enabled; disable(!) L0S */
iwl_set_bit(trans(bus), CSR_GIO_REG,
CSR_GIO_REG_VAL_L0S_ENABLED);
- dev_printk(KERN_INFO, bus->dev, "L1 Enabled; Disabling L0S\n");
+ dev_printk(KERN_INFO, trans(bus)->dev,
+ "L1 Enabled; Disabling L0S\n");
} else {
/* L1-ASPM disabled; enable(!) L0S */
iwl_clear_bit(trans(bus), CSR_GIO_REG,
CSR_GIO_REG_VAL_L0S_ENABLED);
- dev_printk(KERN_INFO, bus->dev, "L1 Disabled; Enabling L0S\n");
+ dev_printk(KERN_INFO, trans(bus)->dev,
+ "L1 Disabled; Enabling L0S\n");
}
}
pci_set_drvdata(pdev, bus);
- bus->dev = &pdev->dev;
bus->ops = &bus_ops_pci;
#ifdef CONFIG_IWLWIFI_IDI
static void iwl_free_fw_desc(struct iwl_bus *bus, struct fw_desc *desc)
{
if (desc->v_addr)
- dma_free_coherent(bus->dev, desc->len,
+ dma_free_coherent(trans(bus)->dev, desc->len,
desc->v_addr, desc->p_addr);
desc->v_addr = NULL;
desc->len = 0;
return -EINVAL;
}
- desc->v_addr = dma_alloc_coherent(bus->dev, len,
+ desc->v_addr = dma_alloc_coherent(trans(bus)->dev, len,
&desc->p_addr, GFP_KERNEL);
if (!desc->v_addr)
return -ENOMEM;