mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-20 08:38:24 +08:00
ACPI: EC: add leading zeros to debug messages
Add leading zeros to pr_debug() calls. For example if x=0x0a, the format "0x%2x" will result the string "0x a", the format "0x%2.2x" will result "0x0a". Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
parent
03d1d99c55
commit
86dae0154a
@ -139,26 +139,26 @@ static struct acpi_ec {
|
|||||||
static inline u8 acpi_ec_read_status(struct acpi_ec *ec)
|
static inline u8 acpi_ec_read_status(struct acpi_ec *ec)
|
||||||
{
|
{
|
||||||
u8 x = inb(ec->command_addr);
|
u8 x = inb(ec->command_addr);
|
||||||
pr_debug(PREFIX "---> status = 0x%2x\n", x);
|
pr_debug(PREFIX "---> status = 0x%2.2x\n", x);
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline u8 acpi_ec_read_data(struct acpi_ec *ec)
|
static inline u8 acpi_ec_read_data(struct acpi_ec *ec)
|
||||||
{
|
{
|
||||||
u8 x = inb(ec->data_addr);
|
u8 x = inb(ec->data_addr);
|
||||||
pr_debug(PREFIX "---> data = 0x%2x\n", x);
|
pr_debug(PREFIX "---> data = 0x%2.2x\n", x);
|
||||||
return inb(ec->data_addr);
|
return inb(ec->data_addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void acpi_ec_write_cmd(struct acpi_ec *ec, u8 command)
|
static inline void acpi_ec_write_cmd(struct acpi_ec *ec, u8 command)
|
||||||
{
|
{
|
||||||
pr_debug(PREFIX "<--- command = 0x%2x\n", command);
|
pr_debug(PREFIX "<--- command = 0x%2.2x\n", command);
|
||||||
outb(command, ec->command_addr);
|
outb(command, ec->command_addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void acpi_ec_write_data(struct acpi_ec *ec, u8 data)
|
static inline void acpi_ec_write_data(struct acpi_ec *ec, u8 data)
|
||||||
{
|
{
|
||||||
pr_debug(PREFIX "<--- data = 0x%2x\n", data);
|
pr_debug(PREFIX "<--- data = 0x%2.2x\n", data);
|
||||||
outb(data, ec->data_addr);
|
outb(data, ec->data_addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user