sysfs.c (f01387d2693813eb5271a3448e6a082322c7d75d) sysfs.c (2f8572344e65296d13c1a771cacfea60916d91dc)
1/*
2 * sysfs.c - ACPI sysfs interface to userspace.
3 */
4
5#include <linux/init.h>
6#include <linux/kernel.h>
7#include <linux/moduleparam.h>
8#include <linux/acpi.h>

--- 523 unchanged lines hidden (view full) ---

532 /* "gpe_all" or "sci" */
533 if (index >= num_gpes + ACPI_NUM_FIXED_EVENTS)
534 goto end;
535
536 result = get_status(index, &status, &handle);
537 if (result)
538 goto end;
539
1/*
2 * sysfs.c - ACPI sysfs interface to userspace.
3 */
4
5#include <linux/init.h>
6#include <linux/kernel.h>
7#include <linux/moduleparam.h>
8#include <linux/acpi.h>

--- 523 unchanged lines hidden (view full) ---

532 /* "gpe_all" or "sci" */
533 if (index >= num_gpes + ACPI_NUM_FIXED_EVENTS)
534 goto end;
535
536 result = get_status(index, &status, &handle);
537 if (result)
538 goto end;
539
540 if (!(status & ACPI_EVENT_FLAG_HANDLE))
540 if (!(status & ACPI_EVENT_FLAG_HAS_HANDLER))
541 size += sprintf(buf + size, " invalid");
542 else if (status & ACPI_EVENT_FLAG_ENABLED)
543 size += sprintf(buf + size, " enabled");
544 else if (status & ACPI_EVENT_FLAG_WAKE_ENABLED)
545 size += sprintf(buf + size, " wake_enabled");
546 else
547 size += sprintf(buf + size, " disabled");
548

--- 27 unchanged lines hidden (view full) ---

576 goto end;
577 }
578
579 /* show the event status for both GPEs and Fixed Events */
580 result = get_status(index, &status, &handle);
581 if (result)
582 goto end;
583
541 size += sprintf(buf + size, " invalid");
542 else if (status & ACPI_EVENT_FLAG_ENABLED)
543 size += sprintf(buf + size, " enabled");
544 else if (status & ACPI_EVENT_FLAG_WAKE_ENABLED)
545 size += sprintf(buf + size, " wake_enabled");
546 else
547 size += sprintf(buf + size, " disabled");
548

--- 27 unchanged lines hidden (view full) ---

576 goto end;
577 }
578
579 /* show the event status for both GPEs and Fixed Events */
580 result = get_status(index, &status, &handle);
581 if (result)
582 goto end;
583
584 if (!(status & ACPI_EVENT_FLAG_HANDLE)) {
584 if (!(status & ACPI_EVENT_FLAG_HAS_HANDLER)) {
585 printk(KERN_WARNING PREFIX
586 "Can not change Invalid GPE/Fixed Event status\n");
587 return -EINVAL;
588 }
589
590 if (index < num_gpes) {
591 if (!strcmp(buf, "disable\n") &&
592 (status & ACPI_EVENT_FLAG_ENABLED))

--- 232 unchanged lines hidden ---
585 printk(KERN_WARNING PREFIX
586 "Can not change Invalid GPE/Fixed Event status\n");
587 return -EINVAL;
588 }
589
590 if (index < num_gpes) {
591 if (!strcmp(buf, "disable\n") &&
592 (status & ACPI_EVENT_FLAG_ENABLED))

--- 232 unchanged lines hidden ---