Pull remove-hotkey into release branch
authorLen Brown <len.brown@intel.com>
Sat, 17 Feb 2007 03:11:02 +0000 (22:11 -0500)
committerLen Brown <len.brown@intel.com>
Sat, 17 Feb 2007 03:11:02 +0000 (22:11 -0500)
1  2 
Documentation/feature-removal-schedule.txt
drivers/acpi/Kconfig
drivers/acpi/asus_acpi.c
drivers/acpi/ibm_acpi.c
drivers/acpi/osl.c
drivers/acpi/toshiba_acpi.c
include/acpi/acpi_drivers.h

index c585aa8d62b430fc4c052253f8db7fd38bd0e2cc,7dec8e0193c0dd685c866a8d39a2437f2ce53f63..28f897fd367490797384e98d2fffa5dc69eb9740
@@@ -215,13 -215,6 +215,13 @@@ Who:     Jean Delvare <khali@linux-fr.org>
  
  ---------------------------
  
 +What:  drivers depending on OBSOLETE_OSS
 +When:  options in 2.6.22, code in 2.6.24
 +Why:   OSS drivers with ALSA replacements
 +Who:   Adrian Bunk <bunk@stusta.de>
 +
 +---------------------------
 +
  What: IPv4 only connection tracking/NAT/helpers
  When: 2.6.22
  Why:  The new layer 3 independant connection tracking replaces the old
@@@ -253,29 -246,6 +253,6 @@@ Who:      Venkatesh Pallipadi <venkatesh.pal
  
  ---------------------------
  
- <<<<<<< test:Documentation/feature-removal-schedule.txt
- What: ACPI hotkey driver (CONFIG_ACPI_HOTKEY)
- When: 2.6.21
- Why:  hotkey.c was an attempt to consolidate multiple drivers that use
-       ACPI to implement hotkeys.  However, hotkeys are not documented
-       in the ACPI specification, so the drivers used undocumented
-       vendor-specific hooks and turned out to be more different than
-       the same.
-       Further, the keys and the features supplied by each platform
-       are different, so there will always be a need for
-       platform-specific drivers.
-       So the new plan is to delete hotkey.c and instead, work on the
-       platform specific drivers to try to make them look the same
-       to the user when they supply the same features.
-       hotkey.c has always depended on CONFIG_EXPERIMENTAL
- Who:  Len Brown <len.brown@intel.com>
- ---------------------------
  What: /sys/firmware/acpi/namespace
  When: 2.6.21
  Why:  The ACPI namespace is effectively the symbol list for
@@@ -319,18 -289,3 +296,18 @@@ Why:    In kernel tree version of drive
        replaced by the skge driver. 
  Who:    Stephen Hemminger <shemminger@osdl.org>
  
 +---------------------------
 +
 +What: Compaq touchscreen device emulation
 +When: Oct 2007
 +Files:        drivers/input/tsdev.c
 +Why:  The code says it was obsolete when it was written in 2001.
 +      tslib is a userspace library which does anything tsdev can do and
 +      much more besides in userspace where this code belongs. There is no
 +      longer any need for tsdev and applications should have converted to
 +      use tslib by now.
 +      The name "tsdev" is also extremely confusing and lots of people have
 +      it loaded when they don't need/use it.
 +Who:  Richard Purdie <rpurdie@rpsys.net>
 +
 +---------------------------
diff --combined drivers/acpi/Kconfig
index 2d21fed402b5a1a8532a11aa7e622e304b9c4dba,4f5bfb1e629a831db9bd51950cbd97b982d1878c..e942ffe8b57ee4c9a13a447bf205e3939815dfcc
@@@ -13,7 -13,6 +13,7 @@@ config ACP
        depends on IA64 || X86
        depends on PCI
        depends on PM
 +      select PNP
        default y
        ---help---
          Advanced Configuration and Power Interface (ACPI) support for 
@@@ -133,15 -132,6 +133,6 @@@ config ACPI_VIDE
          Note that this is an ref. implementation only.  It may or may not work
          for your integrated video device.
  
- config ACPI_HOTKEY
-       tristate "Generic Hotkey (EXPERIMENTAL)"
-       depends on EXPERIMENTAL
-       depends on X86
-       default n
-       help
-         Experimental consolidated hotkey driver.
-         If you are unsure, say N.
  config ACPI_FAN
        tristate "Fan"
        default y
diff --combined drivers/acpi/asus_acpi.c
index 84de0887a0da067a2b5073d635dc43f8eec388de,ab8c5cb8384d2e37ddb49bc8eb7b81babd63ad35..772299fb5f9d97e54078f549e8241a852bbf181b
@@@ -141,7 -141,6 +141,7 @@@ struct asus_hotk 
                W5A,            //W5A
                W3V,            //W3030V
                xxN,            //M2400N, M3700N, M5200N, M6800N, S1300N, S5200N
 +              A4S,            //Z81sp
                //(Centrino)
                END_MODEL
        } model;                //Models currently supported
@@@ -398,16 -397,7 +398,16 @@@ static struct model_data model_conf[END
         .brightness_set = "SPLV",
         .brightness_get = "GPLV",
         .display_set = "SDSP",
 -       .display_get = "\\ADVG"}
 +      .display_get = "\\ADVG"},
 +
 +      {
 +              .name              = "A4S",
 +              .brightness_set    = "SPLV",
 +              .brightness_get    = "GPLV",
 +              .mt_bt_switch      = "BLED",
 +              .mt_wled           = "WLED"
 +      }
 +
  };
  
  /* procdir we use */
@@@ -431,7 -421,7 +431,7 @@@ static struct asus_hotk *hotk
  static int asus_hotk_add(struct acpi_device *device);
  static int asus_hotk_remove(struct acpi_device *device, int type);
  static struct acpi_driver asus_hotk_driver = {
 -      .name = ACPI_HOTK_NAME,
 +      .name = "asus_acpi",
        .class = ACPI_HOTK_CLASS,
        .ids = ACPI_HOTK_HID,
        .ops = {
@@@ -1127,8 -1117,6 +1127,8 @@@ static int asus_model_match(char *model
                return W3V;
        else if (strncmp(model, "W5A", 3) == 0)
                return W5A;
 +      else if (strncmp(model, "A4S", 3) == 0)
 +              return A4S;
        else
                return END_MODEL;
  }
@@@ -1377,10 -1365,6 +1377,6 @@@ static int __init asus_acpi_init(void
        if (acpi_disabled)
                return -ENODEV;
  
-       if (!acpi_specific_hotkey_enabled) {
-               printk(KERN_ERR "Using generic hotkey driver\n");
-               return -ENODEV;
-       }
        asus_proc_dir = proc_mkdir(PROC_ASUS, acpi_root_dir);
        if (!asus_proc_dir) {
                printk(KERN_ERR "Asus ACPI: Unable to create /proc entry\n");
diff --combined drivers/acpi/ibm_acpi.c
index 2429e1180fa9aa09141c6d3abbc9023700d94973,4def52ca69e535fb9f5e93785c0db7930281bcf7..1a0ed3dc409c8426d1e79f084a1ce0e38451bac7
@@@ -496,10 -496,6 +496,10 @@@ static int ibm_acpi_driver_init(void
        printk(IBM_INFO "%s v%s\n", IBM_DESC, IBM_VERSION);
        printk(IBM_INFO "%s\n", IBM_URL);
  
 +      if (ibm_thinkpad_ec_found)
 +              printk(IBM_INFO "ThinkPad EC firmware %s\n",
 +                     ibm_thinkpad_ec_found);
 +
        return 0;
  }
  
@@@ -2621,7 -2617,7 +2621,7 @@@ static void __init ibm_handle_init(cha
        ibm_handle_init(#object, &object##_handle, *object##_parent,    \
                object##_paths, ARRAY_SIZE(object##_paths), &object##_path)
  
 -static int set_ibm_param(const char *val, struct kernel_param *kp)
 +static int __init set_ibm_param(const char *val, struct kernel_param *kp)
  {
        unsigned int i;
  
@@@ -2663,8 -2659,7 +2663,8 @@@ static void acpi_ibm_exit(void
        for (i = ARRAY_SIZE(ibms) - 1; i >= 0; i--)
                ibm_exit(&ibms[i]);
  
 -      remove_proc_entry(IBM_DIR, acpi_root_dir);
 +      if (proc_dir)
 +              remove_proc_entry(IBM_DIR, acpi_root_dir);
  
        if (ibm_thinkpad_ec_found)
                kfree(ibm_thinkpad_ec_found);
@@@ -2701,11 -2696,6 +2701,6 @@@ static int __init acpi_ibm_init(void
        if (acpi_disabled)
                return -ENODEV;
  
-       if (!acpi_specific_hotkey_enabled) {
-               printk(IBM_ERR "using generic hotkey driver\n");
-               return -ENODEV;
-       }
        /* ec is required because many other handles are relative to it */
        IBM_HANDLE_INIT(ec);
        if (!ec_handle) {
  
        /* Models with newer firmware report the EC in DMI */
        ibm_thinkpad_ec_found = check_dmi_for_ec();
 -      if (ibm_thinkpad_ec_found)
 -              printk(IBM_INFO "ThinkPad EC firmware %s\n",
 -                     ibm_thinkpad_ec_found);
  
        /* these handles are not required */
        IBM_HANDLE_INIT(vid);
        proc_dir = proc_mkdir(IBM_DIR, acpi_root_dir);
        if (!proc_dir) {
                printk(IBM_ERR "unable to create proc dir %s", IBM_DIR);
 +              acpi_ibm_exit();
                return -ENODEV;
        }
        proc_dir->owner = THIS_MODULE;
diff --combined drivers/acpi/osl.c
index ee0b9f761f765bb051dc793f81122aaebf1c6560,368e111100bdc0deeb3bb6d174c15e7d720431c9..971eca4864fab3223bc68d97cd032a56d428f4ea
@@@ -46,7 -46,7 +46,7 @@@
  #include <linux/efi.h>
  
  #define _COMPONENT            ACPI_OS_SERVICES
 -ACPI_MODULE_NAME("osl")
 +ACPI_MODULE_NAME("osl");
  #define PREFIX                "ACPI: "
  struct acpi_os_dpc {
        acpi_osd_exec_callback function;
@@@ -68,9 -68,6 +68,6 @@@ EXPORT_SYMBOL(acpi_in_debugger)
  extern char line_buf[80];
  #endif                                /*ENABLE_DEBUGGER */
  
- int acpi_specific_hotkey_enabled = TRUE;
- EXPORT_SYMBOL(acpi_specific_hotkey_enabled);
  static unsigned int acpi_irq_irq;
  static acpi_osd_handler acpi_irq_handler;
  static void *acpi_irq_context;
@@@ -205,7 -202,7 +202,7 @@@ void __iomem *acpi_os_map_memory(acpi_p
  {
        if (phys > ULONG_MAX) {
                printk(KERN_ERR PREFIX "Cannot map memory that high\n");
 -              return 0;
 +              return NULL;
        }
        if (acpi_gbl_permanent_mmap)
                /*
@@@ -890,6 -887,26 +887,6 @@@ u32 acpi_os_get_line(char *buffer
  }
  #endif                                /*  ACPI_FUTURE_USAGE  */
  
 -/* Assumes no unreadable holes inbetween */
 -u8 acpi_os_readable(void *ptr, acpi_size len)
 -{
 -#if defined(__i386__) || defined(__x86_64__)
 -      char tmp;
 -      return !__get_user(tmp, (char __user *)ptr)
 -          && !__get_user(tmp, (char __user *)ptr + len - 1);
 -#endif
 -      return 1;
 -}
 -
 -#ifdef ACPI_FUTURE_USAGE
 -u8 acpi_os_writable(void *ptr, acpi_size len)
 -{
 -      /* could do dummy write (racy) or a kernel page table lookup.
 -         The later may be difficult at early boot when kmap doesn't work yet. */
 -      return 1;
 -}
 -#endif
 -
  acpi_status acpi_os_signal(u32 function, void *info)
  {
        switch (function) {
@@@ -992,14 -1009,6 +989,6 @@@ static int __init acpi_wake_gpes_always
  
  __setup("acpi_wake_gpes_always_on", acpi_wake_gpes_always_on_setup);
  
- static int __init acpi_hotkey_setup(char *str)
- {
-       acpi_specific_hotkey_enabled = FALSE;
-       return 1;
- }
- __setup("acpi_generic_hotkey", acpi_hotkey_setup);
  /*
   * max_cstate is defined in the base kernel so modules can
   * change it w/o depending on the state of the processor module.
index 0208d3a3f5987e9ef4c6b8c0a2f06fa71eb4450c,56ec5503a1248939b767ca1d81a867482c7e8881..faf8a5232d8e5d94d285f7c92bc4b6856ace05bb
@@@ -125,7 -125,7 +125,7 @@@ static int write_acpi_int(const char *m
        union acpi_object in_objs[1];
        acpi_status status;
  
 -      params.count = sizeof(in_objs) / sizeof(in_objs[0]);
 +      params.count = ARRAY_SIZE(in_objs);
        params.pointer = in_objs;
        in_objs[0].type = ACPI_TYPE_INTEGER;
        in_objs[0].integer.value = val;
@@@ -561,10 -561,6 +561,6 @@@ static int __init toshiba_acpi_init(voi
        if (acpi_disabled)
                return -ENODEV;
  
-       if (!acpi_specific_hotkey_enabled) {
-               printk(MY_INFO "Using generic hotkey driver\n");
-               return -ENODEV;
-       }
        /* simple device detection: look for HCI method */
        if (is_valid_acpi_path(METHOD_HCI_1))
                method_hci = METHOD_HCI_1;
index 3d7ebe0e4fc2384b698381394022130cc37e8d2a,0e21efb6f649936b57135c17fed7695b7520a869..07a5eb036e96a01967c1d5264b2c5cceffe24373
@@@ -105,12 -105,6 +105,6 @@@ int acpi_ec_ecdt_probe(void)
  
  int acpi_processor_set_thermal_limit(acpi_handle handle, int type);
  
- /* --------------------------------------------------------------------------
-                                     Hot Keys
-    -------------------------------------------------------------------------- */
- extern int acpi_specific_hotkey_enabled;
  /*--------------------------------------------------------------------------
                                    Dock Station
    -------------------------------------------------------------------------- */
@@@ -122,24 -116,10 +116,24 @@@ extern int register_hotplug_dock_device
        acpi_notify_handler handler, void *context);
  extern void unregister_hotplug_dock_device(acpi_handle handle);
  #else
 -#define is_dock_device(h)                     (0)
 -#define register_dock_notifier(nb)            (-ENODEV)
 -#define unregister_dock_notifier(nb)                  do { } while(0)
 -#define register_hotplug_dock_device(h1, h2, c)       (-ENODEV)
 -#define unregister_hotplug_dock_device(h)       do { } while(0)
 +static inline int is_dock_device(acpi_handle handle)
 +{
 +      return 0;
 +}
 +static inline int register_dock_notifier(struct notifier_block *nb)
 +{
 +      return -ENODEV;
 +}
 +static inline void unregister_dock_notifier(struct notifier_block *nb)
 +{
 +}
 +static inline int register_hotplug_dock_device(acpi_handle handle,
 +                              acpi_notify_handler handler, void *context)
 +{
 +      return -ENODEV;
 +}
 +static inline void unregister_hotplug_dock_device(acpi_handle handle)
 +{
 +}
  #endif
  #endif /*__ACPI_DRIVERS_H__*/