[PATCH] PCI Hotplug: fix up coding style issues
Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
8169b5d238
commit
072888fa60
@ -302,7 +302,7 @@ static int ibm_get_table_from_acpi(char **bufp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
package = (union acpi_object *) buffer.pointer;
|
package = (union acpi_object *) buffer.pointer;
|
||||||
if(!(package) ||
|
if (!(package) ||
|
||||||
(package->type != ACPI_TYPE_PACKAGE) ||
|
(package->type != ACPI_TYPE_PACKAGE) ||
|
||||||
!(package->package.elements)) {
|
!(package->package.elements)) {
|
||||||
err("%s: Invalid APCI object\n", __FUNCTION__);
|
err("%s: Invalid APCI object\n", __FUNCTION__);
|
||||||
@ -405,7 +405,7 @@ static acpi_status __init ibm_find_acpi_device(acpi_handle handle,
|
|||||||
}
|
}
|
||||||
info.hardware_id.value[sizeof(info.hardware_id.value) - 1] = '\0';
|
info.hardware_id.value[sizeof(info.hardware_id.value) - 1] = '\0';
|
||||||
|
|
||||||
if(info.current_status && (info.valid & ACPI_VALID_HID) &&
|
if (info.current_status && (info.valid & ACPI_VALID_HID) &&
|
||||||
(!strcmp(info.hardware_id.value, IBM_HARDWARE_ID1) ||
|
(!strcmp(info.hardware_id.value, IBM_HARDWARE_ID1) ||
|
||||||
!strcmp(info.hardware_id.value, IBM_HARDWARE_ID2))) {
|
!strcmp(info.hardware_id.value, IBM_HARDWARE_ID2))) {
|
||||||
dbg("found hardware: %s, handle: %p\n", info.hardware_id.value,
|
dbg("found hardware: %s, handle: %p\n", info.hardware_id.value,
|
||||||
@ -449,10 +449,8 @@ static int __init ibm_acpiphp_init(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ibm_note.device = device;
|
ibm_note.device = device;
|
||||||
status = acpi_install_notify_handler(
|
status = acpi_install_notify_handler(ibm_acpi_handle,
|
||||||
ibm_acpi_handle,
|
ACPI_DEVICE_NOTIFY, ibm_handle_events,
|
||||||
ACPI_DEVICE_NOTIFY,
|
|
||||||
ibm_handle_events,
|
|
||||||
&ibm_note);
|
&ibm_note);
|
||||||
if (ACPI_FAILURE(status)) {
|
if (ACPI_FAILURE(status)) {
|
||||||
err("%s: Failed to register notification handler\n",
|
err("%s: Failed to register notification handler\n",
|
||||||
@ -487,9 +485,8 @@ static void __exit ibm_acpiphp_exit(void)
|
|||||||
ACPI_DEVICE_NOTIFY,
|
ACPI_DEVICE_NOTIFY,
|
||||||
ibm_handle_events);
|
ibm_handle_events);
|
||||||
if (ACPI_FAILURE(status))
|
if (ACPI_FAILURE(status))
|
||||||
err("%s: Notification handler removal failed\n",
|
err("%s: Notification handler removal failed\n", __FUNCTION__);
|
||||||
__FUNCTION__);
|
/* remove the /sys entries */
|
||||||
// remove the /sys entries
|
|
||||||
if (sysfs_remove_bin_file(sysdir, &ibm_apci_table_attr))
|
if (sysfs_remove_bin_file(sysdir, &ibm_apci_table_attr))
|
||||||
err("%s: removal of sysfs file apci_table failed\n",
|
err("%s: removal of sysfs file apci_table failed\n",
|
||||||
__FUNCTION__);
|
__FUNCTION__);
|
||||||
|
@ -235,12 +235,12 @@ static int set_attention_status(struct hotplug_slot *hotplug_slot, u8 value)
|
|||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
struct slot *pslot;
|
struct slot *pslot;
|
||||||
u8 cmd;
|
u8 cmd = 0x00; /* avoid compiler warning */
|
||||||
|
|
||||||
debug("set_attention_status - Entry hotplug_slot[%lx] value[%x]\n",
|
debug("set_attention_status - Entry hotplug_slot[%lx] value[%x]\n",
|
||||||
(ulong) hotplug_slot, value);
|
(ulong) hotplug_slot, value);
|
||||||
ibmphp_lock_operations();
|
ibmphp_lock_operations();
|
||||||
cmd = 0x00; // avoid compiler warning
|
|
||||||
|
|
||||||
if (hotplug_slot) {
|
if (hotplug_slot) {
|
||||||
switch (value) {
|
switch (value) {
|
||||||
|
Reference in New Issue
Block a user