- use DRIVER_NAME in dprintf.
- unreserve the device in case init failed. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36749 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
07e1164e59
commit
7d8c577325
@ -549,13 +549,18 @@ init_driver(void)
|
||||
#ifdef __HAIKU__
|
||||
if ((err = (*pci->reserve_device)(info.bus, info.device, info.function,
|
||||
DRIVER_NAME, &cards[num_cards])) < B_OK) {
|
||||
dprintf("es1370: failed to reserve_device(%d, %d, %d,): %s\n",
|
||||
info.bus, info.device, info.function, strerror(err));
|
||||
dprintf("%s: failed to reserve_device(%d, %d, %d,): %s\n",
|
||||
DRIVER_NAME, info.bus, info.device, info.function,
|
||||
strerror(err));
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
if (es1370_setup(&cards[num_cards])) {
|
||||
PRINT(("Setup of es1370 %ld failed\n", num_cards+1));
|
||||
#ifdef __HAIKU__
|
||||
(*pci->unreserve_device)(info.bus, info.device, info.function,
|
||||
DRIVER_NAME, &cards[num_cards]);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
num_cards++;
|
||||
|
Loading…
Reference in New Issue
Block a user