~ubuntu-branches/ubuntu/raring/linux-ti-omap4/raring-proposed

« back to all changes in this revision

Viewing changes to drivers/pci/hotplug/pciehp_hpc.c

  • Committer: Package Import Robot
  • Author(s): Paolo Pisati, Paolo Pisati, Ubuntu: 3.5.0-26.42
  • Date: 2013-03-14 15:21:40 UTC
  • mfrom: (76.1.1 quantal-proposed)
  • Revision ID: package-import@ubuntu.com-20130314152140-tl4mkjmxa038tm3h
Tags: 3.5.0-221.31
* Release Tracking Bug
  - LP: #1153648

[ Paolo Pisati ]

* rebased on Ubuntu-3.5.0-26.42

[ Ubuntu: 3.5.0-26.42 ]

* Release Tracking Bug
  - LP: #1152715
* ubuntu: overlayfs -- fix missmerge of vfs_open changes
  - LP: #1122094, #1147678

Show diffs side-by-side

added added

removed removed

Lines of Context:
874
874
static int pcie_init_slot(struct controller *ctrl)
875
875
{
876
876
        struct slot *slot;
 
877
        char name[32];
877
878
 
878
879
        slot = kzalloc(sizeof(*slot), GFP_KERNEL);
879
880
        if (!slot)
880
881
                return -ENOMEM;
881
882
 
 
883
        snprintf(name, sizeof(name), "pciehp-%u", PSN(ctrl));
 
884
        slot->wq = alloc_workqueue(name, 0, 0);
 
885
        if (!slot->wq)
 
886
                goto abort;
 
887
 
882
888
        slot->ctrl = ctrl;
883
889
        mutex_init(&slot->lock);
884
890
        INIT_DELAYED_WORK(&slot->work, pciehp_queue_pushbutton_work);
885
891
        ctrl->slot = slot;
886
892
        return 0;
 
893
abort:
 
894
        kfree(slot);
 
895
        return -ENOMEM;
887
896
}
888
897
 
889
898
static void pcie_cleanup_slot(struct controller *ctrl)
890
899
{
891
900
        struct slot *slot = ctrl->slot;
892
901
        cancel_delayed_work(&slot->work);
893
 
        flush_workqueue(pciehp_wq);
 
902
        destroy_workqueue(slot->wq);
894
903
        kfree(slot);
895
904
}
896
905