diff options
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/edd.c | 2 | ||||
-rw-r--r-- | drivers/firmware/efivars.c | 11 | ||||
-rw-r--r-- | drivers/firmware/pcdp.c | 11 | ||||
-rw-r--r-- | drivers/firmware/pcdp.h | 2 |
4 files changed, 15 insertions, 11 deletions
diff --git a/drivers/firmware/edd.c b/drivers/firmware/edd.c index 33b669e6f977..6996476669f1 100644 --- a/drivers/firmware/edd.c +++ b/drivers/firmware/edd.c | |||
@@ -115,7 +115,7 @@ edd_attr_show(struct kobject * kobj, struct attribute *attr, char *buf) | |||
115 | { | 115 | { |
116 | struct edd_device *dev = to_edd_device(kobj); | 116 | struct edd_device *dev = to_edd_device(kobj); |
117 | struct edd_attribute *edd_attr = to_edd_attr(attr); | 117 | struct edd_attribute *edd_attr = to_edd_attr(attr); |
118 | ssize_t ret = 0; | 118 | ssize_t ret = -EIO; |
119 | 119 | ||
120 | if (edd_attr->show) | 120 | if (edd_attr->show) |
121 | ret = edd_attr->show(dev, buf); | 121 | ret = edd_attr->show(dev, buf); |
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c index 0287ff65963b..33b17c6a46fb 100644 --- a/drivers/firmware/efivars.c +++ b/drivers/firmware/efivars.c | |||
@@ -352,7 +352,7 @@ static ssize_t efivar_attr_show(struct kobject *kobj, struct attribute *attr, | |||
352 | { | 352 | { |
353 | struct efivar_entry *var = to_efivar_entry(kobj); | 353 | struct efivar_entry *var = to_efivar_entry(kobj); |
354 | struct efivar_attribute *efivar_attr = to_efivar_attr(attr); | 354 | struct efivar_attribute *efivar_attr = to_efivar_attr(attr); |
355 | ssize_t ret = 0; | 355 | ssize_t ret = -EIO; |
356 | 356 | ||
357 | if (!capable(CAP_SYS_ADMIN)) | 357 | if (!capable(CAP_SYS_ADMIN)) |
358 | return -EACCES; | 358 | return -EACCES; |
@@ -368,7 +368,7 @@ static ssize_t efivar_attr_store(struct kobject *kobj, struct attribute *attr, | |||
368 | { | 368 | { |
369 | struct efivar_entry *var = to_efivar_entry(kobj); | 369 | struct efivar_entry *var = to_efivar_entry(kobj); |
370 | struct efivar_attribute *efivar_attr = to_efivar_attr(attr); | 370 | struct efivar_attribute *efivar_attr = to_efivar_attr(attr); |
371 | ssize_t ret = 0; | 371 | ssize_t ret = -EIO; |
372 | 372 | ||
373 | if (!capable(CAP_SYS_ADMIN)) | 373 | if (!capable(CAP_SYS_ADMIN)) |
374 | return -EACCES; | 374 | return -EACCES; |
@@ -618,8 +618,8 @@ efivar_create_sysfs_entry(unsigned long variable_name_size, | |||
618 | new_efivar = kmalloc(sizeof(struct efivar_entry), GFP_KERNEL); | 618 | new_efivar = kmalloc(sizeof(struct efivar_entry), GFP_KERNEL); |
619 | 619 | ||
620 | if (!short_name || !new_efivar) { | 620 | if (!short_name || !new_efivar) { |
621 | if (short_name) kfree(short_name); | 621 | kfree(short_name); |
622 | if (new_efivar) kfree(new_efivar); | 622 | kfree(new_efivar); |
623 | return 1; | 623 | return 1; |
624 | } | 624 | } |
625 | memset(short_name, 0, short_name_size+1); | 625 | memset(short_name, 0, short_name_size+1); |
@@ -644,7 +644,8 @@ efivar_create_sysfs_entry(unsigned long variable_name_size, | |||
644 | kobj_set_kset_s(new_efivar, vars_subsys); | 644 | kobj_set_kset_s(new_efivar, vars_subsys); |
645 | kobject_register(&new_efivar->kobj); | 645 | kobject_register(&new_efivar->kobj); |
646 | 646 | ||
647 | kfree(short_name); short_name = NULL; | 647 | kfree(short_name); |
648 | short_name = NULL; | ||
648 | 649 | ||
649 | spin_lock(&efivars_lock); | 650 | spin_lock(&efivars_lock); |
650 | list_add(&new_efivar->list, &efivar_list); | 651 | list_add(&new_efivar->list, &efivar_list); |
diff --git a/drivers/firmware/pcdp.c b/drivers/firmware/pcdp.c index df1b721154d2..839b44a7e08b 100644 --- a/drivers/firmware/pcdp.c +++ b/drivers/firmware/pcdp.c | |||
@@ -23,12 +23,15 @@ setup_serial_console(struct pcdp_uart *uart) | |||
23 | { | 23 | { |
24 | #ifdef CONFIG_SERIAL_8250_CONSOLE | 24 | #ifdef CONFIG_SERIAL_8250_CONSOLE |
25 | int mmio; | 25 | int mmio; |
26 | static char options[64]; | 26 | static char options[64], *p = options; |
27 | 27 | ||
28 | mmio = (uart->addr.address_space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY); | 28 | mmio = (uart->addr.address_space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY); |
29 | snprintf(options, sizeof(options), "console=uart,%s,0x%lx,%lun%d", | 29 | p += sprintf(p, "console=uart,%s,0x%lx", |
30 | mmio ? "mmio" : "io", uart->addr.address, uart->baud, | 30 | mmio ? "mmio" : "io", uart->addr.address); |
31 | uart->bits ? uart->bits : 8); | 31 | if (uart->baud) |
32 | p += sprintf(p, ",%lu", uart->baud); | ||
33 | if (uart->bits) | ||
34 | p += sprintf(p, "n%d", uart->bits); | ||
32 | 35 | ||
33 | return early_serial_console_init(options); | 36 | return early_serial_console_init(options); |
34 | #else | 37 | #else |
diff --git a/drivers/firmware/pcdp.h b/drivers/firmware/pcdp.h index 863bb6f768c3..1dc7c88b7b4d 100644 --- a/drivers/firmware/pcdp.h +++ b/drivers/firmware/pcdp.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * Definitions for PCDP-defined console devices | 2 | * Definitions for PCDP-defined console devices |
3 | * | 3 | * |
4 | * v1.0a: http://www.dig64.org/specifications/DIG64_HCDPv10a_01.pdf | 4 | * v1.0a: http://www.dig64.org/specifications/DIG64_HCDPv10a_01.pdf |
5 | * v2.0: http://www.dig64.org/specifications/DIG64_HCDPv20_042804.pdf | 5 | * v2.0: http://www.dig64.org/specifications/DIG64_PCDPv20.pdf |
6 | * | 6 | * |
7 | * (c) Copyright 2002, 2004 Hewlett-Packard Development Company, L.P. | 7 | * (c) Copyright 2002, 2004 Hewlett-Packard Development Company, L.P. |
8 | * Khalid Aziz <khalid.aziz@hp.com> | 8 | * Khalid Aziz <khalid.aziz@hp.com> |