mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
ipack: save carrier owner to allow device to get it
There was not any kind of protection against carrier driver removal. In this way, device driver can 'get' the carrier driver when it is using it. Signed-off-by: Federico Vaga <[email protected]> Acked-by: Samuel Iglesias Gonsalvez <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
78f22bc29e
commit
36c53b3cc3
3 changed files with 28 additions and 3 deletions
|
|
@ -572,7 +572,8 @@ static int tpci200_pci_probe(struct pci_dev *pdev,
|
|||
/* Register the carrier in the industry pack bus driver */
|
||||
tpci200->info->ipack_bus = ipack_bus_register(&pdev->dev,
|
||||
TPCI200_NB_SLOT,
|
||||
&tpci200_bus_ops);
|
||||
&tpci200_bus_ops,
|
||||
THIS_MODULE);
|
||||
if (!tpci200->info->ipack_bus) {
|
||||
dev_err(&pdev->dev,
|
||||
"error registering the carrier on ipack driver\n");
|
||||
|
|
|
|||
|
|
@ -206,7 +206,8 @@ static struct bus_type ipack_bus_type = {
|
|||
};
|
||||
|
||||
struct ipack_bus_device *ipack_bus_register(struct device *parent, int slots,
|
||||
const struct ipack_bus_ops *ops)
|
||||
const struct ipack_bus_ops *ops,
|
||||
struct module *owner)
|
||||
{
|
||||
int bus_nr;
|
||||
struct ipack_bus_device *bus;
|
||||
|
|
@ -225,6 +226,7 @@ struct ipack_bus_device *ipack_bus_register(struct device *parent, int slots,
|
|||
bus->parent = parent;
|
||||
bus->slots = slots;
|
||||
bus->ops = ops;
|
||||
bus->owner = owner;
|
||||
return bus;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ipack_bus_register);
|
||||
|
|
|
|||
Loading…
Reference in a new issue