]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/pci/hotplug/rpaphp_core.c
Merge branch 'pci/trivial' into next
[mirror_ubuntu-artful-kernel.git] / drivers / pci / hotplug / rpaphp_core.c
index f2945fa73d4ffeeb5010358b5cc63fce32b73a5a..611f6056221a94fbe1e06c289e2a36b33f0e1c52 100644 (file)
@@ -94,7 +94,7 @@ static int get_power_status(struct hotplug_slot *hotplug_slot, u8 *value)
        int retval, level;
        struct slot *slot = (struct slot *)hotplug_slot->private;
 
-       retval = rtas_get_power_level (slot->power_domain, &level);
+       retval = rtas_get_power_level(slot->power_domain, &level);
        if (!retval)
                *value = level;
        return retval;
@@ -356,8 +356,7 @@ EXPORT_SYMBOL_GPL(rpaphp_add_slot);
 
 static void __exit cleanup_slots(void)
 {
-       struct list_head *tmp, *n;
-       struct slot *slot;
+       struct slot *slot, *next;
 
        /*
         * Unregister all of our slots with the pci_hotplug subsystem,
@@ -365,8 +364,8 @@ static void __exit cleanup_slots(void)
         * memory will be freed in release_slot callback.
         */
 
-       list_for_each_safe(tmp, n, &rpaphp_slot_head) {
-               slot = list_entry(tmp, struct slot, rpaphp_slot_list);
+       list_for_each_entry_safe(slot, next, &rpaphp_slot_head,
+                                rpaphp_slot_list) {
                list_del(&slot->rpaphp_slot_list);
                pci_hp_deregister(slot->hotplug_slot);
        }