Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23546
b: refs/heads/master
c: 33d8675
h: refs/heads/master
v: v3
  • Loading branch information
Bjorn Helgaas authored and Linus Torvalds committed Mar 25, 2006
1 parent ba57233 commit e7c423c
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 46 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c2f6fabb2ed3b869bc254c6cdc73d6beaaaf700f
refs/heads/master: 33d8675ea66e79d21da3ed64ce88dfb2a18bc6a7
2 changes: 1 addition & 1 deletion trunk/drivers/net/a2065.c
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ static void __devexit a2065_remove_one(struct zorro_dev *z)

static int __init a2065_init_module(void)
{
return zorro_module_init(&a2065_driver);
return zorro_register_driver(&a2065_driver);
}

static void __exit a2065_cleanup_module(void)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ariadne.c
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ static void __devexit ariadne_remove_one(struct zorro_dev *z)

static int __init ariadne_init_module(void)
{
return zorro_module_init(&ariadne_driver);
return zorro_register_driver(&ariadne_driver);
}

static void __exit ariadne_cleanup_module(void)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/hydra.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ static void __devexit hydra_remove_one(struct zorro_dev *z)

static int __init hydra_init_module(void)
{
return zorro_module_init(&hydra_driver);
return zorro_register_driver(&hydra_driver);
}

static void __exit hydra_cleanup_module(void)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/zorro8390.c
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ static void __devexit zorro8390_remove_one(struct zorro_dev *z)

static int __init zorro8390_init_module(void)
{
return zorro_module_init(&zorro8390_driver);
return zorro_register_driver(&zorro8390_driver);
}

static void __exit zorro8390_cleanup_module(void)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/video/cirrusfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2622,7 +2622,7 @@ static int __init cirrusfb_init(void)
#endif

#ifdef CONFIG_ZORRO
error |= zorro_module_init(&cirrusfb_zorro_driver);
error |= zorro_register_driver(&cirrusfb_zorro_driver);
#endif
#ifdef CONFIG_PCI
error |= pci_register_driver(&cirrusfb_pci_driver);
Expand Down
9 changes: 2 additions & 7 deletions trunk/drivers/zorro/zorro-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,22 +65,17 @@ static int zorro_device_probe(struct device *dev)
* @drv: the driver structure to register
*
* Adds the driver structure to the list of registered drivers
* Returns the number of Zorro devices which were claimed by the driver
* during registration. The driver remains registered even if the
* return value is zero.
* Returns zero or a negative error value.
*/

int zorro_register_driver(struct zorro_driver *drv)
{
int count = 0;

/* initialize common driver fields */
drv->driver.name = drv->name;
drv->driver.bus = &zorro_bus_type;

/* register with core */
count = driver_register(&drv->driver);
return count ? count : 1;
return driver_register(&drv->driver);
}


Expand Down
33 changes: 0 additions & 33 deletions trunk/include/linux/zorro.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,39 +271,6 @@ static inline void zorro_set_drvdata (struct zorro_dev *z, void *data)
}


/*
* A helper function which helps ensure correct zorro_driver
* setup and cleanup for commonly-encountered hotplug/modular cases
*
* This MUST stay in a header, as it checks for -DMODULE
*/
static inline int zorro_module_init(struct zorro_driver *drv)
{
int rc = zorro_register_driver(drv);

if (rc > 0)
return 0;

/* iff CONFIG_HOTPLUG and built into kernel, we should
* leave the driver around for future hotplug events.
* For the module case, a hotplug daemon of some sort
* should load a module in response to an insert event. */
#if defined(CONFIG_HOTPLUG) && !defined(MODULE)
if (rc == 0)
return 0;
#else
if (rc == 0)
rc = -ENODEV;
#endif

/* if we get here, we need to clean up Zorro driver instance
* and return some sort of error */
zorro_unregister_driver(drv);

return rc;
}


/*
* Bitmask indicating portions of available Zorro II RAM that are unused
* by the system. Every bit represents a 64K chunk, for a maximum of 8MB
Expand Down

0 comments on commit e7c423c

Please sign in to comment.