mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-04-01 12:04:08 +00:00
pciehp: use get_service_data
Current pciehp driver saves its private data pointer into pci_dev structure using pci_set_drvdata()/pci_get_drvdata(). But because pciehp is not a pci device driver but a PCI Express service driver, it should save its private data pointer into pcie_device structure using set_service_data()/get_service_data(). Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
This commit is contained in:
parent
3aa50c4462
commit
b97089400d
1 changed files with 3 additions and 5 deletions
|
@ -405,7 +405,7 @@ static int pciehp_probe(struct pcie_device *dev, const struct pcie_port_service_
|
||||||
dbg("%s: controller initialization failed\n", PCIE_MODULE_NAME);
|
dbg("%s: controller initialization failed\n", PCIE_MODULE_NAME);
|
||||||
goto err_out_none;
|
goto err_out_none;
|
||||||
}
|
}
|
||||||
pci_set_drvdata(pdev, ctrl);
|
set_service_data(dev, ctrl);
|
||||||
|
|
||||||
/* Setup the slot information structures */
|
/* Setup the slot information structures */
|
||||||
rc = init_slots(ctrl);
|
rc = init_slots(ctrl);
|
||||||
|
@ -445,8 +445,7 @@ err_out_none:
|
||||||
|
|
||||||
static void pciehp_remove (struct pcie_device *dev)
|
static void pciehp_remove (struct pcie_device *dev)
|
||||||
{
|
{
|
||||||
struct pci_dev *pdev = dev->port;
|
struct controller *ctrl = get_service_data(dev);
|
||||||
struct controller *ctrl = pci_get_drvdata(pdev);
|
|
||||||
|
|
||||||
cleanup_slots(ctrl);
|
cleanup_slots(ctrl);
|
||||||
ctrl->hpc_ops->release_ctlr(ctrl);
|
ctrl->hpc_ops->release_ctlr(ctrl);
|
||||||
|
@ -463,8 +462,7 @@ static int pciehp_resume (struct pcie_device *dev)
|
||||||
{
|
{
|
||||||
printk("%s ENTRY\n", __func__);
|
printk("%s ENTRY\n", __func__);
|
||||||
if (pciehp_force) {
|
if (pciehp_force) {
|
||||||
struct pci_dev *pdev = dev->port;
|
struct controller *ctrl = get_service_data(dev);
|
||||||
struct controller *ctrl = pci_get_drvdata(pdev);
|
|
||||||
struct slot *t_slot;
|
struct slot *t_slot;
|
||||||
u8 status;
|
u8 status;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue