login
Header Space

 
 

Re: [PATCH 3/4] Introduce pci_slot

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Morton <akpm@...>
Cc: Kenji Kaneshige <kaneshige.kenji@...>, Greg KH <gregkh@...>, Gary Hade <garyhade@...>, Kristen Carlson Accardi <kristen.c.accardi@...>, Matthew Wilcox <matthew@...>, <warthog19@...>, <rick.jones2@...>, <linux-kernel@...>, <linux-pci@...>, <linux-acpi@...>
Date: Friday, March 28, 2008 - 11:41 am

Hi Andrew,

* Andrew Morton <akpm@linux-foundation.org>:

Sorry for the sloppiness. :(

In the future, do you have a better suggestion on how to do large
sweeps on code for hardware that one might not own? Is there an
easier way other than setting up a cross-compiler environment?

Thanks.

/ac

Subject: [PATCH] remove rpaphp 'address_read_file'
From: Alex Chiang <achiang@hp.com>

Physical pci_slot removed ->get_address methods from individual
PCI hotplug drivers, but overlooked rpaphp, causing build errors.

Remove rpaphp's 'address_read_file' as well.

Signed-off-by: Alex Chiang <achiang@hp.com>
---
 drivers/pci/hotplug/rpaphp_slot.c |   37 -------------------------------------
 1 files changed, 0 insertions(+), 37 deletions(-)

diff --git a/drivers/pci/hotplug/rpaphp_slot.c b/drivers/pci/hotplug/rpaphp_slot.c
index 8e5fff0..0d4cfc7 100644
--- a/drivers/pci/hotplug/rpaphp_slot.c
+++ b/drivers/pci/hotplug/rpaphp_slot.c
@@ -33,33 +33,6 @@
 #include <asm/rtas.h>
 #include "rpaphp.h"
 
-static ssize_t address_read_file (struct hotplug_slot *php_slot, char *buf)
-{
-	int retval;
-	struct slot *slot = (struct slot *)php_slot->private;
-	struct pci_bus *bus;
-
-	if (!slot)
-		return -ENOENT;
-
-	bus = slot->bus;
-	if (!bus)
-		return -ENOENT;
-
-	if (bus->self)
-		retval = sprintf(buf, pci_name(bus->self));
-	else
-		retval = sprintf(buf, "%04x:%02x:00.0",
-		        pci_domain_nr(bus), bus->number);
-
-	return retval;
-}
-
-static struct hotplug_slot_attribute php_attr_address = {
-	.attr = {.name = "address", .mode = S_IFREG | S_IRUGO},
-	.show = address_read_file,
-};
-
 /* free up the memory used by a slot */
 static void rpaphp_release_slot(struct hotplug_slot *hotplug_slot)
 {
@@ -135,9 +108,6 @@ int rpaphp_deregister_slot(struct slot *slot)
 
 	list_del(&slot->rpaphp_slot_list);
 	
-	/* remove "address" file */
-	sysfs_remove_file(&php_slot->kobj, &php_attr_address.attr);
-
 	retval = pci_hp_deregister(php_slot);
 	if (retval)
 		err("Problem unregistering a slot %s\n", slot->name);
@@ -169,13 +139,6 @@ int rpaphp_register_slot(struct slot *slot)
 		return retval;
 	}
 
-	/* create "address" file */
-	retval = sysfs_create_file(&php_slot->kobj, &php_attr_address.attr);
-	if (retval) {
-		err("sysfs_create_file failed with error %d\n", retval);
-		goto sysfs_fail;
-	}
-
 	/* add slot to our internal list */
 	list_add(&slot->rpaphp_slot_list, &rpaphp_slot_head);
 	info("Slot [%s] registered\n", slot->name);
-- 
1.5.3.1.g1e61

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/4, v11] PCI, ACPI: Physical PCI slot objects, Alex Chiang, (Tue Mar 25, 12:13 am)
[PATCH 4/4] ACPI PCI slot detection driver, Alex Chiang, (Tue Mar 25, 12:17 am)
Re: [PATCH 4/4] ACPI PCI slot detection driver, Kenji Kaneshige, (Tue Mar 25, 12:50 am)
[PATCH 3/4] Introduce pci_slot, Alex Chiang, (Tue Mar 25, 12:17 am)
Re: [PATCH 3/4] Introduce pci_slot, Andrew Morton, (Fri Mar 28, 6:39 am)
Re: [PATCH 3/4] Introduce pci_slot, Alex Chiang, (Fri Mar 28, 11:41 am)
Re: [PATCH 3/4] Introduce pci_slot, Andrew Morton, (Fri Mar 28, 1:56 pm)
Re: [PATCH 3/4] Introduce pci_slot, Kenji Kaneshige, (Tue Mar 25, 12:49 am)
[PATCH 2/4] Export kobject_rename for pci_hotplug_core, Alex Chiang, (Tue Mar 25, 12:16 am)
[PATCH 1/4] Construct one fakephp slot per pci slot, Alex Chiang, (Tue Mar 25, 12:15 am)
speck-geostationary