}
if (s) {
- err = seq_printf(s, " [%u/0x%02X]: 0x%02X\n",
+ err = seq_printf(s, " [0x%02X/0x%02X]: 0x%02X\n",
bank, reg, value);
if (err < 0) {
dev_err(dev,
- "seq_printf overflow bank=%d reg=%d\n",
+ "seq_printf overflow bank=0x%02X reg=0x%02X\n",
bank, reg);
/* Error is not returned here since
* the output is wanted in any case */
return 0;
}
} else {
- printk(KERN_INFO" [%u/0x%02X]: 0x%02X\n", bank,
- reg, value);
+ printk(KERN_INFO" [0x%02X/0x%02X]: 0x%02X\n",
+ bank, reg, value);
}
}
}
seq_printf(s, AB8500_NAME_STRING " register values:\n");
- seq_printf(s, " bank %u:\n", bank);
+ seq_printf(s, " bank 0x%02X:\n", bank);
ab8500_registers_print(dev, bank, s);
return 0;
seq_printf(s, AB8500_NAME_STRING " register values:\n");
for (i = 1; i < AB8500_NUM_BANKS; i++) {
- err = seq_printf(s, " bank %u:\n", i);
+ err = seq_printf(s, " bank 0x%02X:\n", i);
if (err < 0)
- dev_err(dev, "seq_printf overflow, bank=%d\n", i);
+ dev_err(dev, "seq_printf overflow, bank=0x%02X\n", i);
ab8500_registers_print(dev, i, s);
}
printk(KERN_INFO"ab8500 register values:\n");
for (i = 1; i < AB8500_NUM_BANKS; i++) {
- printk(KERN_INFO" bank %u:\n", i);
+ printk(KERN_INFO" bank 0x%02X:\n", i);
ab8500_registers_print(dev, i, NULL);
}
}
static int ab8500_bank_print(struct seq_file *s, void *p)
{
- return seq_printf(s, "%d\n", debug_bank);
+ return seq_printf(s, "0x%02X\n", debug_bank);
}
static int ab8500_bank_open(struct inode *inode, struct file *file)