Revert "staging: gasket: page table: hold references to device and pci_dev"
gasket_free_dev() is called only from driver PCI probe and remove
function. It is guaranteed that that pci_dev structure is not going
anywhere during that time; there is no need to take this additional
reference.
This reverts commit dd9d1502fe
.
Reported-by: Dmitry Torokhov <dtor@chromium.org>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Родитель
e02fed16b3
Коммит
d29f6c19b0
|
@ -280,7 +280,7 @@ int gasket_page_table_init(struct gasket_page_table **ppg_tbl,
|
|||
pg_tbl->extended_offset_reg =
|
||||
(u64 __iomem *)&bar_data->virt_base[page_table_config->extended_reg];
|
||||
pg_tbl->device = get_device(device);
|
||||
pg_tbl->pci_dev = pci_dev_get(pci_dev);
|
||||
pg_tbl->pci_dev = pci_dev;
|
||||
|
||||
dev_dbg(device, "Page table initialized successfully\n");
|
||||
|
||||
|
@ -378,7 +378,6 @@ void gasket_page_table_cleanup(struct gasket_page_table *pg_tbl)
|
|||
pg_tbl->entries = NULL;
|
||||
|
||||
put_device(pg_tbl->device);
|
||||
pci_dev_put(pg_tbl->pci_dev);
|
||||
kfree(pg_tbl);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче