aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/sonypi.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor_core@ameritech.net>2005-06-30 01:50:38 -0400
committerDmitry Torokhov <dtor_core@ameritech.net>2005-06-30 01:50:38 -0400
commit5b6271bda42be8edb77fbd588621cc09199fa7fb (patch)
treee51dbf0bb79ead8c2a0df4c527d100c518c889ea /drivers/char/sonypi.c
parentf96b434d3bf70845a7541ab217f525918267281e (diff)
Input: make name, phys and uniq be 'const char *' because once
set noone should attempt to change them. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/char/sonypi.c')
-rw-r--r--drivers/char/sonypi.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c
index 983915bf87f1..cefbe985e55c 100644
--- a/drivers/char/sonypi.c
+++ b/drivers/char/sonypi.c
@@ -1228,14 +1228,7 @@ static int __devinit sonypi_probe(void)
1228 sonypi_device.input_jog_dev.keybit[LONG(BTN_MOUSE)] = 1228 sonypi_device.input_jog_dev.keybit[LONG(BTN_MOUSE)] =
1229 BIT(BTN_MIDDLE); 1229 BIT(BTN_MIDDLE);
1230 sonypi_device.input_jog_dev.relbit[0] = BIT(REL_WHEEL); 1230 sonypi_device.input_jog_dev.relbit[0] = BIT(REL_WHEEL);
1231 sonypi_device.input_jog_dev.name = 1231 sonypi_device.input_jog_dev.name = SONYPI_JOG_INPUTNAME;
1232 kmalloc(sizeof(SONYPI_JOG_INPUTNAME), GFP_KERNEL);
1233 if (!sonypi_device.input_jog_dev.name) {
1234 printk(KERN_ERR "sonypi: kmalloc failed\n");
1235 ret = -ENOMEM;
1236 goto out_inkmallocinput1;
1237 }
1238 sprintf(sonypi_device.input_jog_dev.name, SONYPI_JOG_INPUTNAME);
1239 sonypi_device.input_jog_dev.id.bustype = BUS_ISA; 1232 sonypi_device.input_jog_dev.id.bustype = BUS_ISA;
1240 sonypi_device.input_jog_dev.id.vendor = PCI_VENDOR_ID_SONY; 1233 sonypi_device.input_jog_dev.id.vendor = PCI_VENDOR_ID_SONY;
1241 1234
@@ -1249,14 +1242,7 @@ static int __devinit sonypi_probe(void)
1249 if (sonypi_inputkeys[i].inputev) 1242 if (sonypi_inputkeys[i].inputev)
1250 set_bit(sonypi_inputkeys[i].inputev, 1243 set_bit(sonypi_inputkeys[i].inputev,
1251 sonypi_device.input_key_dev.keybit); 1244 sonypi_device.input_key_dev.keybit);
1252 sonypi_device.input_key_dev.name = 1245 sonypi_device.input_key_dev.name = SONYPI_KEY_INPUTNAME;
1253 kmalloc(sizeof(SONYPI_KEY_INPUTNAME), GFP_KERNEL);
1254 if (!sonypi_device.input_key_dev.name) {
1255 printk(KERN_ERR "sonypi: kmalloc failed\n");
1256 ret = -ENOMEM;
1257 goto out_inkmallocinput2;
1258 }
1259 sprintf(sonypi_device.input_key_dev.name, SONYPI_KEY_INPUTNAME);
1260 sonypi_device.input_key_dev.id.bustype = BUS_ISA; 1246 sonypi_device.input_key_dev.id.bustype = BUS_ISA;
1261 sonypi_device.input_key_dev.id.vendor = PCI_VENDOR_ID_SONY; 1247 sonypi_device.input_key_dev.id.vendor = PCI_VENDOR_ID_SONY;
1262 1248
@@ -1314,11 +1300,7 @@ out_platformdev:
1314 kfifo_free(sonypi_device.input_fifo); 1300 kfifo_free(sonypi_device.input_fifo);
1315out_infifo: 1301out_infifo:
1316 input_unregister_device(&sonypi_device.input_key_dev); 1302 input_unregister_device(&sonypi_device.input_key_dev);
1317 kfree(sonypi_device.input_key_dev.name);
1318out_inkmallocinput2:
1319 input_unregister_device(&sonypi_device.input_jog_dev); 1303 input_unregister_device(&sonypi_device.input_jog_dev);
1320 kfree(sonypi_device.input_jog_dev.name);
1321out_inkmallocinput1:
1322 free_irq(sonypi_device.irq, sonypi_irq); 1304 free_irq(sonypi_device.irq, sonypi_irq);
1323out_reqirq: 1305out_reqirq:
1324 release_region(sonypi_device.ioport1, sonypi_device.region_size); 1306 release_region(sonypi_device.ioport1, sonypi_device.region_size);
@@ -1345,9 +1327,7 @@ static void __devexit sonypi_remove(void)
1345 1327
1346 if (useinput) { 1328 if (useinput) {
1347 input_unregister_device(&sonypi_device.input_key_dev); 1329 input_unregister_device(&sonypi_device.input_key_dev);
1348 kfree(sonypi_device.input_key_dev.name);
1349 input_unregister_device(&sonypi_device.input_jog_dev); 1330 input_unregister_device(&sonypi_device.input_jog_dev);
1350 kfree(sonypi_device.input_jog_dev.name);
1351 kfifo_free(sonypi_device.input_fifo); 1331 kfifo_free(sonypi_device.input_fifo);
1352 } 1332 }
1353 1333