Bugzilla – Attachment 50750 Details for
Bug 118602
oops after unloading pcc_acpi
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
fix pcc_acpi somehow (works for me)
pcc_acpi-oops-after-unload-and-make-it-work.diff (text/plain), 6.85 KB, created by
Forgotten User ZhJd0F0L3x
on 2005-09-23 16:29:44 UTC
(
hide
)
Description:
fix pcc_acpi somehow (works for me)
Filename:
MIME Type:
Creator:
Forgotten User ZhJd0F0L3x
Created:
2005-09-23 16:29:44 UTC
Size:
6.85 KB
patch
obsolete
>Make the pcc_acpi driver work _at all_ (logic inversion), >fix an oops after unload if somebody accessed /proc/bus/input/devices >(missing input_unregister_device) >and fix up the whitespace amount in the logmessages. >The driver now works as advertised on a PANASONIC Toughbook CF-51. > >Author: Stefan Seyfried <seife@suse.de> >Signed-Off-by: Stefan Seyfried <seife@suse.de> > >--- linux/drivers/acpi~/pcc_acpi.c 2005-09-13 17:52:25.000000000 +0200 >+++ linux/drivers/acpi/pcc_acpi.c 2005-09-23 16:52:01.000000000 +0200 >@@ -137,8 +137,8 @@ static inline int acpi_pcc_get_sqty(stru > return(s); > } > else { >- printk(PCC_ERR "acpi_pcc_get_sqty() evaluation error \ >- HKEY.SQTY\n"); >+ printk(PCC_ERR "acpi_pcc_get_sqty() evaluation error " >+ "HKEY.SQTY\n"); > return(-EINVAL); > } > } >@@ -152,21 +152,21 @@ static int acpi_pcc_retrieve_biosdata(st > > status = acpi_evaluate_object(hotkey->handle, "SINF", 0 , &buffer); > if (ACPI_FAILURE(status)) { >- printk(PCC_ERR "acpi_pcc_retrieve_biosdata() evaluation error \ >- HKEY.SINF\n"); >+ printk(PCC_ERR "acpi_pcc_retrieve_biosdata() evaluation error " >+ "HKEY.SINF\n"); > return 0; > } > > hkey = buffer.pointer; > if (!hkey || (hkey->type != ACPI_TYPE_PACKAGE)) { >- printk(PCC_ERR "acpi_pcc_retrieve_biosdata() invalid \ >- HKEY.SINF\n"); >+ printk(PCC_ERR "acpi_pcc_retrieve_biosdata() invalid " >+ "HKEY.SINF\n"); > goto end; > } > > if (hotkey->num_sifr < hkey->package.count) { >- printk(PCC_ERR "acpi_pcc_retrieve_biosdata() SQTY reports bad \ >- SINF length\n"); >+ printk(PCC_ERR "acpi_pcc_retrieve_biosdata() SQTY reports bad " >+ "SINF length\n"); > status = AE_ERROR; > goto end; > } >@@ -177,8 +177,8 @@ static int acpi_pcc_retrieve_biosdata(st > sinf[i] = element->integer.value; > } > else { >- printk(PCC_ERR "acpi_pcc_retrieve_biosdata() invalid \ >- HKEY.SINF data"); >+ printk(PCC_ERR "acpi_pcc_retrieve_biosdata() invalid " >+ "HKEY.SINF data"); > } > } > sinf[hkey->package.count] = -1; >@@ -187,10 +187,10 @@ end: > acpi_os_free(buffer.pointer); > > if (status != AE_OK) { >- return -1; >+ return 0; > } > >- return 0; >+ return 1; > } > > static int acpi_pcc_read_sinf_field(struct seq_file *seq, int field) >@@ -199,8 +199,8 @@ static int acpi_pcc_read_sinf_field(stru > u32* sinf = kmalloc(sizeof(u32) * (hotkey->num_sifr + 1), GFP_KERNEL); > > if (!sinf) { >- printk(PCC_ERR "acpi_pcc_read_sinf_field() could not allocate \ >- %li bytes\n", sizeof(u32) * hotkey->num_sifr); >+ printk(PCC_ERR "acpi_pcc_read_sinf_field() could not allocate " >+ "%li bytes\n", sizeof(u32) * hotkey->num_sifr); > return 0; > } > >@@ -208,8 +208,9 @@ static int acpi_pcc_read_sinf_field(stru > seq_printf(seq, "%u\n", sinf[field]); > } > else { >- printk(PCC_ERR "acpi_pcc_read_sinf_field() could not retrieve \ >- BIOS data\n"); >+ seq_printf(seq, "error"); >+ printk(PCC_ERR "acpi_pcc_read_sinf_field() could not retrieve " >+ "BIOS data\n"); > } > > kfree(sinf); >@@ -321,8 +322,8 @@ static unsigned long acpi_pcc_write_brig > } > > if (!sinf) { >- printk(PCC_ERR "acpi_pcc_write_brightness() could not \ >- allocate %li bytes\n", >+ printk(PCC_ERR "acpi_pcc_write_brightness() could not " >+ "allocate %li bytes\n", > sizeof(u32) * hotkey->num_sifr); > return -EFAULT; > } >@@ -334,8 +335,8 @@ static unsigned long acpi_pcc_write_brig > write_string[count] = '\0'; > > if (!acpi_pcc_retrieve_biosdata(hotkey, sinf)) { >- printk(PCC_ERR "acpi_pcc_write_brightness() could not \ >- retrieve BIOS data\n"); >+ printk(PCC_ERR "acpi_pcc_write_brightness() could not " >+ "retrieve BIOS data\n"); > goto end; > } > >@@ -444,8 +445,8 @@ static void acpi_pcc_generete_keyinput(s > hkey_num = hinf & 0xf; > > if ((0 > hkey_num) || (hkey_num > ARRAY_SIZE(key_map))) { >- printk(PCC_ERR "acpi_pcc_generete_keyinput() hotkey \ >- number (%d) out of range\n", hkey_num); >+ printk(PCC_ERR "acpi_pcc_generete_keyinput() hotkey " >+ "number (%d) out of range\n", hkey_num); > return; > } > >@@ -471,8 +472,8 @@ static int acpi_pcc_hotkey_get_key(struc > hotkey->status = result; > } > else { >- printk(PCC_ERR "acpi_pcc_hotkey_get_key() error getting \ >- hotkey status\n"); >+ printk(PCC_ERR "acpi_pcc_hotkey_get_key() error getting " >+ "hotkey status\n"); > } > > if (status != AE_OK) { >@@ -687,8 +688,8 @@ static int __init acpi_pcc_proc_init(str > acpi_pcc_dir = proc_mkdir(PROC_PCC, acpi_root_dir); > > if (unlikely(!acpi_pcc_dir)) { >- printk(PCC_ERR "acpi_pcc_proc_init() could not create proc \ >- entry\n"); >+ printk(PCC_ERR "acpi_pcc_proc_init() could not create proc " >+ "entry\n"); > return -ENODEV; > } > >@@ -745,16 +746,16 @@ static int acpi_pcc_init_input(struct ac > hotk_input_dev = kmalloc(sizeof(struct input_dev),GFP_KERNEL); > > if (!hotk_input_dev) { >- printk(PCC_ERR "acpi_pcc_init_input() could not allocate \ >- memory\n"); >+ printk(PCC_ERR "acpi_pcc_init_input() could not allocate " >+ "memory\n"); > return -ENOMEM; > } > > pcc_keyinput = kmalloc(sizeof(struct pcc_keyinput),GFP_KERNEL); > > if (!pcc_keyinput) { >- printk(PCC_ERR "acpi_pcc_init_input() could not allocate \ >- memory\n"); >+ printk(PCC_ERR "acpi_pcc_init_input() could not allocate " >+ "memory\n"); > return -ENOMEM; > } > >@@ -806,16 +807,16 @@ static int acpi_pcc_hotkey_add (struct a > num_sifr = acpi_pcc_get_sqty(device); > > if (num_sifr > 255) { >- printk(PCC_ERR "acpi_pcc_hotkey_add() num_sifr too large \ >- (%i)\n", num_sifr); >+ printk(PCC_ERR "acpi_pcc_hotkey_add() num_sifr too large " >+ "(%i)\n", num_sifr); > return -ENODEV; > } > > hotkey = kmalloc(sizeof(struct acpi_hotkey), GFP_KERNEL); > > if (!hotkey) { >- printk(PCC_ERR "acpi_pcc_hotkey_add() could not allocate \ >- memory\n"); >+ printk(PCC_ERR "acpi_pcc_hotkey_add() could not allocate " >+ "memory\n"); > return -ENOMEM; > } > >@@ -835,8 +836,8 @@ static int acpi_pcc_hotkey_add (struct a > hotkey); > > if (ACPI_FAILURE(status)) { >- printk(PCC_ERR "acpi_pcc_hotkey_add() error installing notify \ >- handler\n"); >+ printk(PCC_ERR "acpi_pcc_hotkey_add() error installing notify " >+ "handler\n"); > kfree(hotkey); > return -ENODEV; > } >@@ -844,8 +845,8 @@ static int acpi_pcc_hotkey_add (struct a > result = acpi_pcc_init_input(hotkey); > > if (result) { >- printk(PCC_ERR "acpi_pcc_hotkey_add() error installing input \ >- handler\n"); >+ printk(PCC_ERR "acpi_pcc_hotkey_add() error installing input " >+ "handler\n"); > kfree(hotkey); > return result; > } >@@ -874,10 +875,12 @@ static int acpi_pcc_hotkey_remove(struct > ACPI_DEVICE_NOTIFY, acpi_pcc_hotkey_notify); > > if (ACPI_FAILURE(status)) { >- printk(PCC_ERR "acpi_pcc_hotkey_remove() error removing \ >- notify handler\n"); >+ printk(PCC_ERR "acpi_pcc_hotkey_remove() error removing " >+ "notify handler\n"); > } > >+ input_unregister_device(hotkey->input_dev); >+ > kfree(hotkey); > > if(status != AE_OK) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 118602
:
50750
|
50941