Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23186
b: refs/heads/master
c: a453456
h: refs/heads/master
v: v3
  • Loading branch information
Kenji Kaneshige authored and Greg Kroah-Hartman committed Mar 23, 2006
1 parent 4247097 commit f8473d0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5b1a960d180e9660a87b0c661a754efabc1b1d3a
refs/heads/master: a4534560815ffc525bfbe465a290ce048aab4c01
4 changes: 2 additions & 2 deletions trunk/drivers/pci/hotplug/shpchp.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ struct event_info {
};

struct controller {
struct controller *next;
struct list_head ctrl_list;
struct mutex crit_sect; /* critical section mutex */
struct php_ctlr_state_s *hpc_ctlr_handle; /* HPC controller handle */
int num_slots; /* Number of slots on ctlr */
Expand Down Expand Up @@ -204,7 +204,7 @@ extern void shpchp_remove_ctrl_files(struct controller *ctrl);


/* Global variables */
extern struct controller *shpchp_ctrl_list;
extern struct list_head shpchp_ctrl_list;

struct ctrl_reg {
volatile u32 base_offset;
Expand Down
25 changes: 7 additions & 18 deletions trunk/drivers/pci/hotplug/shpchp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
int shpchp_debug;
int shpchp_poll_mode;
int shpchp_poll_time;
struct controller *shpchp_ctrl_list; /* = NULL */
LIST_HEAD(shpchp_ctrl_list);

#define DRIVER_VERSION "0.4"
#define DRIVER_AUTHOR "Dan Zink <dan.zink@compaq.com>, Greg Kroah-Hartman <greg@kroah.com>, Dely Sy <dely.l.sy@intel.com>"
Expand Down Expand Up @@ -452,13 +452,7 @@ static int shpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
/* Finish setting up the hot plug ctrl device */
ctrl->next_event = 0;

if (!shpchp_ctrl_list) {
shpchp_ctrl_list = ctrl;
ctrl->next = NULL;
} else {
ctrl->next = shpchp_ctrl_list;
shpchp_ctrl_list = ctrl;
}
list_add(&ctrl->ctrl_list, &shpchp_ctrl_list);

shpchp_create_ctrl_files(ctrl);

Expand Down Expand Up @@ -493,22 +487,17 @@ static int shpc_start_thread(void)

static void __exit unload_shpchpd(void)
{
struct list_head *tmp;
struct list_head *next;
struct controller *ctrl;
struct controller *tctrl;

ctrl = shpchp_ctrl_list;

while (ctrl) {
list_for_each_safe(tmp, next, &shpchp_ctrl_list) {
ctrl = list_entry(tmp, struct controller, ctrl_list);
shpchp_remove_ctrl_files(ctrl);
cleanup_slots(ctrl);

kfree (ctrl->pci_bus);
ctrl->hpc_ops->release_ctlr(ctrl);

tctrl = ctrl;
ctrl = ctrl->next;

kfree(tctrl);
kfree(ctrl);
}

/* Stop the notification mechanism */
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/pci/hotplug/shpchp_ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ static int event_thread(void* data)
if (pushbutton_pending)
shpchp_pushbutton_thread(pushbutton_pending);
else
for (ctrl = shpchp_ctrl_list; ctrl; ctrl=ctrl->next)
list_for_each_entry(ctrl, &shpchp_ctrl_list, ctrl_list)
interrupt_event_handler(ctrl);
}
dbg("event_thread signals exit\n");
Expand Down

0 comments on commit f8473d0

Please sign in to comment.