git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
[pandora-kernel.git]
/
drivers
/
pci
/
hotplug
/
rpaphp_slot.c
diff --git
a/drivers/pci/hotplug/rpaphp_slot.c
b/drivers/pci/hotplug/rpaphp_slot.c
index
5088450
..
2ea9cf1
100644
(file)
--- a/
drivers/pci/hotplug/rpaphp_slot.c
+++ b/
drivers/pci/hotplug/rpaphp_slot.c
@@
-43,7
+43,7
@@
static void rpaphp_release_slot(struct hotplug_slot *hotplug_slot)
void dealloc_slot_struct(struct slot *slot)
{
kfree(slot->hotplug_slot->info);
void dealloc_slot_struct(struct slot *slot)
{
kfree(slot->hotplug_slot->info);
- kfree(slot->
hotplug_slot->
name);
+ kfree(slot->name);
kfree(slot->hotplug_slot);
kfree(slot);
}
kfree(slot->hotplug_slot);
kfree(slot);
}
@@
-63,11
+63,9
@@
struct slot *alloc_slot_struct(struct device_node *dn,
GFP_KERNEL);
if (!slot->hotplug_slot->info)
goto error_hpslot;
GFP_KERNEL);
if (!slot->hotplug_slot->info)
goto error_hpslot;
- slot->
hotplug_slot->name = kmalloc(strlen(drc_name) + 1
, GFP_KERNEL);
- if (!slot->
hotplug_slot->
name)
+ slot->
name = kstrdup(drc_name
, GFP_KERNEL);
+ if (!slot->name)
goto error_info;
goto error_info;
- slot->name = slot->hotplug_slot->name;
- strcpy(slot->name, drc_name);
slot->dn = dn;
slot->index = drc_index;
slot->power_domain = power_domain;
slot->dn = dn;
slot->index = drc_index;
slot->power_domain = power_domain;
@@
-137,7
+135,7
@@
int rpaphp_register_slot(struct slot *slot)
slotno = PCI_SLOT(PCI_DN(slot->dn->child)->devfn);
else
slotno = -1;
slotno = PCI_SLOT(PCI_DN(slot->dn->child)->devfn);
else
slotno = -1;
- retval = pci_hp_register(php_slot, slot->bus, slotno);
+ retval = pci_hp_register(php_slot, slot->bus, slotno
, slot->name
);
if (retval) {
err("pci_hp_register failed with error %d\n", retval);
return retval;
if (retval) {
err("pci_hp_register failed with error %d\n", retval);
return retval;