summaryrefslogtreecommitdiff
path: root/drivers/base/interface.c
diff options
context:
space:
mode:
authorPatrick Mochel <mochel@osdl.org>2002-05-29 23:09:12 -0700
committerPatrick Mochel <mochel@osdl.org>2002-05-29 23:09:12 -0700
commit64d1cb77639c233714ce611c978242272dee3f33 (patch)
treef633b87fcda4525bec638aaacb84d8660ddee5c6 /drivers/base/interface.c
parent22775da009ff878e020593ad247d7615e16f6ce8 (diff)
driverfs: Remove default 'status' file: it had no useful read information, the commands it supported were minimal and probably broken and the comments were wrong.
Diffstat (limited to 'drivers/base/interface.c')
-rw-r--r--drivers/base/interface.c70
1 files changed, 0 insertions, 70 deletions
diff --git a/drivers/base/interface.c b/drivers/base/interface.c
index c53a36baf4f9..5d03984a273f 100644
--- a/drivers/base/interface.c
+++ b/drivers/base/interface.c
@@ -9,75 +9,6 @@
#include <linux/err.h>
#include <linux/stat.h>
-/**
- * device_read_status - report some device information
- * @page: page-sized buffer to write into
- * @count: number of bytes requested
- * @off: offset into buffer
- * @data: device-specific data
- *
- * Report some human-readable information about the device.
- * This includes the name, the bus id, and the current power state.
- */
-static ssize_t device_read_status(struct device * dev, char * page, size_t count, loff_t off)
-{
- return off ? 0 : sprintf(page,"%s\n",dev->bus_id);
-}
-
-/**
- * device_write_status - forward a command to a driver
- * @buf: encoded command
- * @count: number of bytes in buffer
- * @off: offset into buffer to start with
- * @data: device-specific data
- *
- * Send a comamnd to a device driver.
- * The following actions are supported:
- * probe - scan slot for device
- * remove - detach driver from slot
- * suspend <state> <stage> - perform <stage> for entering <state>
- * resume <stage> - perform <stage> for waking device up.
- * (See Documentation/driver-model.txt for the theory of an n-stage
- * suspend sequence).
- */
-static ssize_t device_write_status(struct device * dev, const char* buf, size_t count, loff_t off)
-{
- char command[20];
- int num;
- int arg = 0;
- int error = 0;
-
- if (off)
- return 0;
-
- /* everything involves dealing with the driver. */
- if (!dev->driver)
- return 0;
-
- num = sscanf(buf,"%10s %d",command,&arg);
-
- if (!num)
- return 0;
-
- if (!strcmp(command,"probe")) {
- if (dev->driver->probe)
- error = dev->driver->probe(dev);
-
- } else if (!strcmp(command,"remove")) {
- if (dev->driver->remove)
- error = dev->driver->remove(dev,REMOVE_NOTIFY);
- } else
- error = -EFAULT;
- return error < 0 ? error : count;
-}
-
-static struct driver_file_entry device_status_entry = {
- name: "status",
- mode: S_IWUSR | S_IRUGO,
- show: device_read_status,
- store: device_write_status,
-};
-
static ssize_t device_read_name(struct device * dev, char * buf, size_t count, loff_t off)
{
return off ? 0 : sprintf(buf,"%s\n",dev->name);
@@ -166,7 +97,6 @@ static struct driver_file_entry device_power_entry = {
};
struct driver_file_entry * device_default_files[] = {
- &device_status_entry,
&device_name_entry,
&device_power_entry,
NULL,