aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/ec.c
diff options
context:
space:
mode:
authorThomas Renninger <trenn@suse.de>2010-07-16 07:11:34 -0400
committerMatthew Garrett <mjg@redhat.com>2010-08-03 09:49:06 -0400
commit49c6c5ff924cecc0b6260109a510b7ed4c970dc5 (patch)
treeb9443479cb3315d24f51baaa2242592927c15afc /drivers/acpi/ec.c
parent9fab10cdf58099beff08d74f6b4a6633305c5754 (diff)
ACPI: Remove /proc/acpi/embedded_controller/..
Other patches in this series add the same info to /sys/... and /proc/ioports. The info removed should never have been used in an application, eventually someone read it manually. /proc/acpi is deprecated for more than a year anyway... Signed-off-by: Thomas Renninger <trenn@suse.de> CC: Alexey Starikovskiy <astarikovskiy@suse.de> CC: Len Brown <lenb@kernel.org> CC: linux-kernel@vger.kernel.org CC: linux-acpi@vger.kernel.org CC: platform-driver-x86@vger.kernel.org Signed-off-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'drivers/acpi/ec.c')
-rw-r--r--drivers/acpi/ec.c81
1 files changed, 1 insertions, 80 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 5f2027d782e..ce1f07fd724 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -34,8 +34,6 @@
34#include <linux/init.h> 34#include <linux/init.h>
35#include <linux/types.h> 35#include <linux/types.h>
36#include <linux/delay.h> 36#include <linux/delay.h>
37#include <linux/proc_fs.h>
38#include <linux/seq_file.h>
39#include <linux/interrupt.h> 37#include <linux/interrupt.h>
40#include <linux/list.h> 38#include <linux/list.h>
41#include <linux/spinlock.h> 39#include <linux/spinlock.h>
@@ -679,72 +677,6 @@ acpi_ec_space_handler(u32 function, acpi_physical_address address,
679} 677}
680 678
681/* -------------------------------------------------------------------------- 679/* --------------------------------------------------------------------------
682 FS Interface (/proc)
683 -------------------------------------------------------------------------- */
684
685static struct proc_dir_entry *acpi_ec_dir;
686
687static int acpi_ec_read_info(struct seq_file *seq, void *offset)
688{
689 struct acpi_ec *ec = seq->private;
690
691 if (!ec)
692 goto end;
693
694 seq_printf(seq, "gpe:\t\t\t0x%02x\n", (u32) ec->gpe);
695 seq_printf(seq, "ports:\t\t\t0x%02x, 0x%02x\n",
696 (unsigned)ec->command_addr, (unsigned)ec->data_addr);
697 seq_printf(seq, "use global lock:\t%s\n",
698 ec->global_lock ? "yes" : "no");
699 end:
700 return 0;
701}
702
703static int acpi_ec_info_open_fs(struct inode *inode, struct file *file)
704{
705 return single_open(file, acpi_ec_read_info, PDE(inode)->data);
706}
707
708static const struct file_operations acpi_ec_info_ops = {
709 .open = acpi_ec_info_open_fs,
710 .read = seq_read,
711 .llseek = seq_lseek,
712 .release = single_release,
713 .owner = THIS_MODULE,
714};
715
716static int acpi_ec_add_fs(struct acpi_device *device)
717{
718 struct proc_dir_entry *entry = NULL;
719
720 if (!acpi_device_dir(device)) {
721 acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device),
722 acpi_ec_dir);
723 if (!acpi_device_dir(device))
724 return -ENODEV;
725 }
726
727 entry = proc_create_data(ACPI_EC_FILE_INFO, S_IRUGO,
728 acpi_device_dir(device),
729 &acpi_ec_info_ops, acpi_driver_data(device));
730 if (!entry)
731 return -ENODEV;
732 return 0;
733}
734
735static int acpi_ec_remove_fs(struct acpi_device *device)
736{
737
738 if (acpi_device_dir(device)) {
739 remove_proc_entry(ACPI_EC_FILE_INFO, acpi_device_dir(device));
740 remove_proc_entry(acpi_device_bid(device), acpi_ec_dir);
741 acpi_device_dir(device) = NULL;
742 }
743
744 return 0;
745}
746
747/* --------------------------------------------------------------------------
748 Driver Interface 680 Driver Interface
749 -------------------------------------------------------------------------- */ 681 -------------------------------------------------------------------------- */
750static acpi_status 682static acpi_status
@@ -894,7 +826,6 @@ static int acpi_ec_add(struct acpi_device *device)
894 if (!first_ec) 826 if (!first_ec)
895 first_ec = ec; 827 first_ec = ec;
896 device->driver_data = ec; 828 device->driver_data = ec;
897 acpi_ec_add_fs(device);
898 pr_info(PREFIX "GPE = 0x%lx, I/O: command/status = 0x%lx, data = 0x%lx\n", 829 pr_info(PREFIX "GPE = 0x%lx, I/O: command/status = 0x%lx, data = 0x%lx\n",
899 ec->gpe, ec->command_addr, ec->data_addr); 830 ec->gpe, ec->command_addr, ec->data_addr);
900 831
@@ -921,7 +852,6 @@ static int acpi_ec_remove(struct acpi_device *device, int type)
921 kfree(handler); 852 kfree(handler);
922 } 853 }
923 mutex_unlock(&ec->lock); 854 mutex_unlock(&ec->lock);
924 acpi_ec_remove_fs(device);
925 device->driver_data = NULL; 855 device->driver_data = NULL;
926 if (ec == first_ec) 856 if (ec == first_ec)
927 first_ec = NULL; 857 first_ec = NULL;
@@ -1120,16 +1050,10 @@ int __init acpi_ec_init(void)
1120{ 1050{
1121 int result = 0; 1051 int result = 0;
1122 1052
1123 acpi_ec_dir = proc_mkdir(ACPI_EC_CLASS, acpi_root_dir);
1124 if (!acpi_ec_dir)
1125 return -ENODEV;
1126
1127 /* Now register the driver for the EC */ 1053 /* Now register the driver for the EC */
1128 result = acpi_bus_register_driver(&acpi_ec_driver); 1054 result = acpi_bus_register_driver(&acpi_ec_driver);
1129 if (result < 0) { 1055 if (result < 0)
1130 remove_proc_entry(ACPI_EC_CLASS, acpi_root_dir);
1131 return -ENODEV; 1056 return -ENODEV;
1132 }
1133 1057
1134 return result; 1058 return result;
1135} 1059}
@@ -1140,9 +1064,6 @@ static void __exit acpi_ec_exit(void)
1140{ 1064{
1141 1065
1142 acpi_bus_unregister_driver(&acpi_ec_driver); 1066 acpi_bus_unregister_driver(&acpi_ec_driver);
1143
1144 remove_proc_entry(ACPI_EC_CLASS, acpi_root_dir);
1145
1146 return; 1067 return;
1147} 1068}
1148#endif /* 0 */ 1069#endif /* 0 */