X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=drivers%2Fpci%2Fhotplug%2Fshpchp_sysfs.c;h=29fa9d26adae28b0e49e0a39e16796439f1c4b4f;hb=900bca34940ca1db8dd04a2e9b240ffac32da6f6;hp=ce41719a88f780519942aaf2664ca7f7ed213495;hpb=7e88ed199689f333668b62348051202706b6a74a;p=linux-2.6-omap-h63xx.git diff --git a/drivers/pci/hotplug/shpchp_sysfs.c b/drivers/pci/hotplug/shpchp_sysfs.c index ce41719a88f..29fa9d26ada 100644 --- a/drivers/pci/hotplug/shpchp_sysfs.c +++ b/drivers/pci/hotplug/shpchp_sysfs.c @@ -26,12 +26,9 @@ * */ -#include #include #include #include -#include -#include #include #include "shpchp.h" @@ -54,8 +51,10 @@ static ssize_t show_ctrl (struct device *dev, struct device_attribute *attr, cha res = bus->resource[index]; if (res && (res->flags & IORESOURCE_MEM) && !(res->flags & IORESOURCE_PREFETCH)) { - out += sprintf(out, "start = %8.8lx, length = %8.8lx\n", - res->start, (res->end - res->start)); + out += sprintf(out, "start = %8.8llx, " + "length = %8.8llx\n", + (unsigned long long)res->start, + (unsigned long long)(res->end - res->start)); } } out += sprintf(out, "Free resources: prefetchable memory\n"); @@ -63,16 +62,20 @@ static ssize_t show_ctrl (struct device *dev, struct device_attribute *attr, cha res = bus->resource[index]; if (res && (res->flags & IORESOURCE_MEM) && (res->flags & IORESOURCE_PREFETCH)) { - out += sprintf(out, "start = %8.8lx, length = %8.8lx\n", - res->start, (res->end - res->start)); + out += sprintf(out, "start = %8.8llx, " + "length = %8.8llx\n", + (unsigned long long)res->start, + (unsigned long long)(res->end - res->start)); } } out += sprintf(out, "Free resources: IO\n"); for (index = 0; index < PCI_BUS_NUM_RESOURCES; index++) { res = bus->resource[index]; if (res && (res->flags & IORESOURCE_IO)) { - out += sprintf(out, "start = %8.8lx, length = %8.8lx\n", - res->start, (res->end - res->start)); + out += sprintf(out, "start = %8.8llx, " + "length = %8.8llx\n", + (unsigned long long)res->start, + (unsigned long long)(res->end - res->start)); } } out += sprintf(out, "Free resources: bus numbers\n"); @@ -88,7 +91,12 @@ static ssize_t show_ctrl (struct device *dev, struct device_attribute *attr, cha } static DEVICE_ATTR (ctrl, S_IRUGO, show_ctrl, NULL); -void shpchp_create_ctrl_files (struct controller *ctrl) +int __must_check shpchp_create_ctrl_files (struct controller *ctrl) { - device_create_file (&ctrl->pci_dev->dev, &dev_attr_ctrl); + return device_create_file (&ctrl->pci_dev->dev, &dev_attr_ctrl); +} + +void shpchp_remove_ctrl_files(struct controller *ctrl) +{ + device_remove_file(&ctrl->pci_dev->dev, &dev_attr_ctrl); }