Skip to content

Commit

Permalink
PCI: pciehp: Declare pciehp_enable/disable_slot() static
Browse files Browse the repository at this point in the history
No callers of pciehp_enable/disable_slot() outside of pciehp_ctrl.c
remain, so declare the functions static.  For now this requires forward
declarations.  Those can be eliminated by reshuffling functions once the
ongoing effort to refactor the driver has settled.

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
  • Loading branch information
Lukas Wunner authored and Bjorn Helgaas committed Jul 23, 2018
1 parent 1656716 commit 25c83b8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 0 additions & 2 deletions drivers/pci/hotplug/pciehp.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,6 @@ void pciehp_queue_pushbutton_work(struct work_struct *work);
struct controller *pcie_init(struct pcie_device *dev);
int pcie_init_notification(struct controller *ctrl);
void pcie_shutdown_notification(struct controller *ctrl);
int pciehp_enable_slot(struct slot *p_slot);
int pciehp_disable_slot(struct slot *p_slot);
void pcie_reenable_notification(struct controller *ctrl);
int pciehp_power_on_slot(struct slot *slot);
void pciehp_power_off_slot(struct slot *slot);
Expand Down
7 changes: 5 additions & 2 deletions drivers/pci/hotplug/pciehp_ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ static void remove_board(struct slot *p_slot)
pciehp_green_led_off(p_slot);
}

static int pciehp_enable_slot(struct slot *slot);
static int pciehp_disable_slot(struct slot *slot);

void pciehp_request(struct controller *ctrl, int action)
{
atomic_or(action, &ctrl->pending_events);
Expand Down Expand Up @@ -308,7 +311,7 @@ static int __pciehp_enable_slot(struct slot *p_slot)
return board_added(p_slot);
}

int pciehp_enable_slot(struct slot *slot)
static int pciehp_enable_slot(struct slot *slot)
{
struct controller *ctrl = slot->ctrl;
int ret;
Expand Down Expand Up @@ -342,7 +345,7 @@ static int __pciehp_disable_slot(struct slot *p_slot)
return 0;
}

int pciehp_disable_slot(struct slot *slot)
static int pciehp_disable_slot(struct slot *slot)
{
int ret;

Expand Down

0 comments on commit 25c83b8

Please sign in to comment.