#include <linux/string.h>
 #include <linux/list.h>
 #include <linux/mutex.h>
+#include <linux/sched.h>
 #include <linux/kthread.h>
 #include <linux/freezer.h>
 #include <linux/delay.h>
 
 /* Debugging printk groups */
 #define TPACPI_DBG_ALL         0xffff
+#define TPACPI_DBG_DISCLOSETASK        0x8000
 #define TPACPI_DBG_INIT                0x0001
 #define TPACPI_DBG_EXIT                0x0002
 
        do { } while (0)
 #endif
 
+static void tpacpi_log_usertask(const char * const what)
+{
+       printk(TPACPI_DEBUG "%s: access by process with PID %d\n",
+               what, task_tgid_vnr(current));
+}
+
+#define tpacpi_disclose_usertask(what, format, arg...) \
+       do { \
+               if (unlikely( \
+                   (dbg_level & TPACPI_DBG_DISCLOSETASK) && \
+                   (tpacpi_lifecycle == TPACPI_LIFE_RUNNING))) { \
+                       printk(TPACPI_DEBUG "%s: PID %d: " format, \
+                               what, task_tgid_vnr(current), ## arg); \
+               } \
+       } while (0)
 
 /****************************************************************************
  ****************************************************************************
        return 0;
 }
 
+static void printk_deprecated_attribute(const char * const what,
+                                       const char * const details)
+{
+       tpacpi_log_usertask("deprecated sysfs attribute");
+       printk(TPACPI_WARN "WARNING: sysfs attribute %s is deprecated and "
+               "will be removed. %s\n",
+               what, details);
+}
+
+static void printk_deprecated_rfkill_attribute(const char * const what)
+{
+       printk_deprecated_attribute(what,
+                       "Please switch to generic rfkill before year 2010");
+}
+
 /*************************************************************************
  * thinkpad-acpi driver attributes
  */
 {
        int status;
 
+       printk_deprecated_rfkill_attribute("bluetooth_enable");
+
        status = bluetooth_get_radiosw();
        if (status < 0)
                return status;
        unsigned long t;
        int res;
 
+       printk_deprecated_rfkill_attribute("bluetooth_enable");
+
        if (parse_strtoul(buf, 1, &t))
                return -EINVAL;
 
 {
        int status;
 
+       printk_deprecated_rfkill_attribute("wwan_enable");
+
        status = wan_get_radiosw();
        if (status < 0)
                return status;
        unsigned long t;
        int res;
 
+       printk_deprecated_rfkill_attribute("wwan_enable");
+
        if (parse_strtoul(buf, 1, &t))
                return -EINVAL;