Skip to content

Commit

Permalink
ioport: Improve error output
Browse files Browse the repository at this point in the history
When failing due to conflicting I/O port registrations,
include the offending I/O port address in the message.

Cc: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
  • Loading branch information
afaerber authored and aurel32 committed Mar 6, 2011
1 parent e323c93 commit f66a99d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ioport.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ int register_ioport_read(pio_addr_t start, int length, int size,
for(i = start; i < start + length; i += size) {
ioport_read_table[bsize][i] = func;
if (ioport_opaque[i] != NULL && ioport_opaque[i] != opaque)
hw_error("register_ioport_read: invalid opaque");
hw_error("register_ioport_read: invalid opaque for address 0x%x",
i);
ioport_opaque[i] = opaque;
}
return 0;
Expand All @@ -168,7 +169,8 @@ int register_ioport_write(pio_addr_t start, int length, int size,
for(i = start; i < start + length; i += size) {
ioport_write_table[bsize][i] = func;
if (ioport_opaque[i] != NULL && ioport_opaque[i] != opaque)
hw_error("register_ioport_write: invalid opaque");
hw_error("register_ioport_write: invalid opaque for address 0x%x",
i);
ioport_opaque[i] = opaque;
}
return 0;
Expand Down

0 comments on commit f66a99d

Please sign in to comment.