aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/panasonic-laptop.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/platform/x86/panasonic-laptop.c')
-rw-r--r--drivers/platform/x86/panasonic-laptop.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/platform/x86/panasonic-laptop.c b/drivers/platform/x86/panasonic-laptop.c
index c47a44dcb702..a5ce4bc202e3 100644
--- a/drivers/platform/x86/panasonic-laptop.c
+++ b/drivers/platform/x86/panasonic-laptop.c
@@ -184,6 +184,7 @@ static const struct acpi_device_id pcc_device_ids[] = {
184 { "MAT0019", 0}, 184 { "MAT0019", 0},
185 { "", 0}, 185 { "", 0},
186}; 186};
187MODULE_DEVICE_TABLE(acpi, pcc_device_ids);
187 188
188static struct acpi_driver acpi_pcc_driver = { 189static struct acpi_driver acpi_pcc_driver = {
189 .name = ACPI_PCC_DRIVER_NAME, 190 .name = ACPI_PCC_DRIVER_NAME,
@@ -366,7 +367,7 @@ static ssize_t show_numbatt(struct device *dev, struct device_attribute *attr,
366 if (!acpi_pcc_retrieve_biosdata(pcc, pcc->sinf)) 367 if (!acpi_pcc_retrieve_biosdata(pcc, pcc->sinf))
367 return -EIO; 368 return -EIO;
368 369
369 return sprintf(buf, "%u\n", pcc->sinf[SINF_NUM_BATTERIES]); 370 return snprintf(buf, PAGE_SIZE, "%u\n", pcc->sinf[SINF_NUM_BATTERIES]);
370} 371}
371 372
372static ssize_t show_lcdtype(struct device *dev, struct device_attribute *attr, 373static ssize_t show_lcdtype(struct device *dev, struct device_attribute *attr,
@@ -378,7 +379,7 @@ static ssize_t show_lcdtype(struct device *dev, struct device_attribute *attr,
378 if (!acpi_pcc_retrieve_biosdata(pcc, pcc->sinf)) 379 if (!acpi_pcc_retrieve_biosdata(pcc, pcc->sinf))
379 return -EIO; 380 return -EIO;
380 381
381 return sprintf(buf, "%u\n", pcc->sinf[SINF_LCD_TYPE]); 382 return snprintf(buf, PAGE_SIZE, "%u\n", pcc->sinf[SINF_LCD_TYPE]);
382} 383}
383 384
384static ssize_t show_mute(struct device *dev, struct device_attribute *attr, 385static ssize_t show_mute(struct device *dev, struct device_attribute *attr,
@@ -390,7 +391,7 @@ static ssize_t show_mute(struct device *dev, struct device_attribute *attr,
390 if (!acpi_pcc_retrieve_biosdata(pcc, pcc->sinf)) 391 if (!acpi_pcc_retrieve_biosdata(pcc, pcc->sinf))
391 return -EIO; 392 return -EIO;
392 393
393 return sprintf(buf, "%u\n", pcc->sinf[SINF_MUTE]); 394 return snprintf(buf, PAGE_SIZE, "%u\n", pcc->sinf[SINF_MUTE]);
394} 395}
395 396
396static ssize_t show_sticky(struct device *dev, struct device_attribute *attr, 397static ssize_t show_sticky(struct device *dev, struct device_attribute *attr,
@@ -402,7 +403,7 @@ static ssize_t show_sticky(struct device *dev, struct device_attribute *attr,
402 if (!acpi_pcc_retrieve_biosdata(pcc, pcc->sinf)) 403 if (!acpi_pcc_retrieve_biosdata(pcc, pcc->sinf))
403 return -EIO; 404 return -EIO;
404 405
405 return sprintf(buf, "%u\n", pcc->sinf[SINF_STICKY_KEY]); 406 return snprintf(buf, PAGE_SIZE, "%u\n", pcc->sinf[SINF_STICKY_KEY]);
406} 407}
407 408
408static ssize_t set_sticky(struct device *dev, struct device_attribute *attr, 409static ssize_t set_sticky(struct device *dev, struct device_attribute *attr,