mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 14:19:16 +00:00
nubus: Make struct nubus_driver::remove return void
The nubus core ignores the return value of the remove callback (in nubus_device_remove()) and all implementers return 0 anyway. So make it impossible for future drivers to return an unused error code by changing the remove prototype to return void. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Finn Thain <fthain@linux-m68k.org> Link: https://lore.kernel.org/r/20210727080840.3550927-3-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
df6192f47d
commit
b2c943e527
3 changed files with 3 additions and 6 deletions
|
@ -428,13 +428,12 @@ static int mac8390_device_probe(struct nubus_board *board)
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int mac8390_device_remove(struct nubus_board *board)
|
static void mac8390_device_remove(struct nubus_board *board)
|
||||||
{
|
{
|
||||||
struct net_device *dev = nubus_get_drvdata(board);
|
struct net_device *dev = nubus_get_drvdata(board);
|
||||||
|
|
||||||
unregister_netdev(dev);
|
unregister_netdev(dev);
|
||||||
free_netdev(dev);
|
free_netdev(dev);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct nubus_driver mac8390_driver = {
|
static struct nubus_driver mac8390_driver = {
|
||||||
|
|
|
@ -603,7 +603,7 @@ static int mac_sonic_nubus_probe(struct nubus_board *board)
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int mac_sonic_nubus_remove(struct nubus_board *board)
|
static void mac_sonic_nubus_remove(struct nubus_board *board)
|
||||||
{
|
{
|
||||||
struct net_device *ndev = nubus_get_drvdata(board);
|
struct net_device *ndev = nubus_get_drvdata(board);
|
||||||
struct sonic_local *lp = netdev_priv(ndev);
|
struct sonic_local *lp = netdev_priv(ndev);
|
||||||
|
@ -613,8 +613,6 @@ static int mac_sonic_nubus_remove(struct nubus_board *board)
|
||||||
SIZEOF_SONIC_DESC * SONIC_BUS_SCALE(lp->dma_bitmode),
|
SIZEOF_SONIC_DESC * SONIC_BUS_SCALE(lp->dma_bitmode),
|
||||||
lp->descriptors, lp->descriptors_laddr);
|
lp->descriptors, lp->descriptors_laddr);
|
||||||
free_netdev(ndev);
|
free_netdev(ndev);
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct nubus_driver mac_sonic_nubus_driver = {
|
static struct nubus_driver mac_sonic_nubus_driver = {
|
||||||
|
|
|
@ -86,7 +86,7 @@ extern struct list_head nubus_func_rsrcs;
|
||||||
struct nubus_driver {
|
struct nubus_driver {
|
||||||
struct device_driver driver;
|
struct device_driver driver;
|
||||||
int (*probe)(struct nubus_board *board);
|
int (*probe)(struct nubus_board *board);
|
||||||
int (*remove)(struct nubus_board *board);
|
void (*remove)(struct nubus_board *board);
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct bus_type nubus_bus_type;
|
extern struct bus_type nubus_bus_type;
|
||||||
|
|
Loading…
Reference in a new issue