Align labels in column 0, adjust spacing in 'if' statements, eliminate
trailing and superfluous whitespaces.
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
int result;
result = acpi_get_name(acpi_dev->handle, ACPI_FULL_PATHNAME, &path);
int result;
result = acpi_get_name(acpi_dev->handle, ACPI_FULL_PATHNAME, &path);
goto end;
result = sprintf(buf, "%s\n", (char*)path.pointer);
kfree(path.pointer);
goto end;
result = sprintf(buf, "%s\n", (char*)path.pointer);
kfree(path.pointer);
return result;
}
static DEVICE_ATTR(path, 0444, acpi_device_path_show, NULL);
return result;
}
static DEVICE_ATTR(path, 0444, acpi_device_path_show, NULL);
/*
* Devices gotten from FADT don't have a "path" attribute
*/
/*
* Devices gotten from FADT don't have a "path" attribute
*/
result = device_create_file(&dev->dev, &dev_attr_path);
result = device_create_file(&dev->dev, &dev_attr_path);
- if(dev->flags.hardware_id) {
+ if (dev->flags.hardware_id) {
result = device_create_file(&dev->dev, &dev_attr_hid);
result = device_create_file(&dev->dev, &dev_attr_hid);
- if (dev->flags.hardware_id || dev->flags.compatible_ids){
+ if (dev->flags.hardware_id || dev->flags.compatible_ids) {
result = device_create_file(&dev->dev, &dev_attr_modalias);
result = device_create_file(&dev->dev, &dev_attr_modalias);
status = acpi_get_handle(dev->handle, "_EJ0", &temp);
if (ACPI_SUCCESS(status))
result = device_create_file(&dev->dev, &dev_attr_eject);
status = acpi_get_handle(dev->handle, "_EJ0", &temp);
if (ACPI_SUCCESS(status))
result = device_create_file(&dev->dev, &dev_attr_eject);
if (dev->flags.hardware_id || dev->flags.compatible_ids)
device_remove_file(&dev->dev, &dev_attr_modalias);
if (dev->flags.hardware_id || dev->flags.compatible_ids)
device_remove_file(&dev->dev, &dev_attr_modalias);
- if(dev->flags.hardware_id)
+ if (dev->flags.hardware_id)
device_remove_file(&dev->dev, &dev_attr_hid);
device_remove_file(&dev->dev, &dev_attr_hid);
device_remove_file(&dev->dev, &dev_attr_path);
}
/* --------------------------------------------------------------------------
device_remove_file(&dev->dev, &dev_attr_path);
}
/* --------------------------------------------------------------------------
acpi_device_bus_id = new_bus_id;
strcpy(acpi_device_bus_id->bus_id, device->flags.hardware_id ? device->pnp.hardware_id : "device");
acpi_device_bus_id->instance_no = 0;
acpi_device_bus_id = new_bus_id;
strcpy(acpi_device_bus_id->bus_id, device->flags.hardware_id ? device->pnp.hardware_id : "device");
acpi_device_bus_id->instance_no = 0;
device->dev.bus = &acpi_bus_type;
device->dev.release = &acpi_device_release;
result = device_register(&device->dev);
device->dev.bus = &acpi_bus_type;
device->dev.release = &acpi_device_release;
result = device_register(&device->dev);
dev_err(&device->dev, "Error registering device\n");
goto end;
}
result = acpi_device_setup_files(device);
dev_err(&device->dev, "Error registering device\n");
goto end;
}
result = acpi_device_setup_files(device);
printk(KERN_ERR PREFIX "Error creating sysfs interface for device %s\n",
dev_name(&device->dev));
device->removal_type = ACPI_BUS_REMOVAL_NORMAL;
return 0;
printk(KERN_ERR PREFIX "Error creating sysfs interface for device %s\n",
dev_name(&device->dev));
device->removal_type = ACPI_BUS_REMOVAL_NORMAL;
return 0;
mutex_lock(&acpi_device_lock);
if (device->parent)
list_del(&device->node);
mutex_lock(&acpi_device_lock);
if (device->parent)
list_del(&device->node);
* @device: the device to add and initialize
* @driver: driver for the device
*
* @device: the device to add and initialize
* @driver: driver for the device
*
- * Used to initialize a device via its device driver. Called whenever a
+ * Used to initialize a device via its device driver. Called whenever a
* driver is bound to a device. Invokes the driver's add() ops.
*/
static int
* driver is bound to a device. Invokes the driver's add() ops.
*/
static int
if (!device || !driver)
return -EINVAL;
if (!device || !driver)
return -EINVAL;
if (!acpi_match_device_ids(device, button_device_ids))
device->wakeup.flags.run_wake = 1;
if (!acpi_match_device_ids(device, button_device_ids))
device->wakeup.flags.run_wake = 1;
if (ACPI_FAILURE(status))
device->flags.wake_capable = 0;
return 0;
if (ACPI_FAILURE(status))
device->flags.wake_capable = 0;
return 0;
* \_SB
* ----
* Fix for the system root bus device -- the only root-level device.
* \_SB
* ----
* Fix for the system root bus device -- the only root-level device.
device->parent->ops.bind(device);
}
device->parent->ops.bind(device);
}
if (!result)
*child = device;
else {
if (!result)
*child = device;
else {
EXPORT_SYMBOL(acpi_bus_add);
int acpi_bus_start(struct acpi_device *device)
EXPORT_SYMBOL(acpi_bus_add);
int acpi_bus_start(struct acpi_device *device)
EXPORT_SYMBOL(acpi_bus_start);
int acpi_bus_trim(struct acpi_device *start, int rmdevice)
EXPORT_SYMBOL(acpi_bus_start);
int acpi_bus_trim(struct acpi_device *start, int rmdevice)
}
EXPORT_SYMBOL_GPL(acpi_bus_trim);
}
EXPORT_SYMBOL_GPL(acpi_bus_trim);
static int acpi_bus_scan_fixed(struct acpi_device *root)
{
int result = 0;
static int acpi_bus_scan_fixed(struct acpi_device *root)
{
int result = 0;
if (result)
acpi_device_unregister(acpi_root, ACPI_BUS_REMOVAL_NORMAL);
if (result)
acpi_device_unregister(acpi_root, ACPI_BUS_REMOVAL_NORMAL);