summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/base/bus.c9
-rw-r--r--drivers/base/class.c6
-rw-r--r--drivers/base/core.c7
-rw-r--r--drivers/base/driver.c5
-rw-r--r--drivers/base/firmware.c6
-rw-r--r--drivers/base/init.c8
-rw-r--r--drivers/base/interface.c8
-rw-r--r--drivers/base/platform.c5
-rw-r--r--drivers/base/power.c14
-rw-r--r--drivers/base/sys.c6
-rw-r--r--include/linux/device.h18
11 files changed, 62 insertions, 30 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index e290ffe53bdb..6b19c58feb98 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -1,10 +1,11 @@
/*
* bus.c - bus driver management
+ *
+ * Copyright (c) 2002-3 Patrick Mochel
+ * Copyright (c) 2002-3 Open Source Development Labs
*
- * Copyright (c) 2002 Patrick Mochel
- * 2002 Open Source Development Lab
- *
- *
+ * This file is released under the GPLv2
+ *
*/
#undef DEBUG
diff --git a/drivers/base/class.c b/drivers/base/class.c
index a15be3cc03ac..7e1b0eb6913c 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -1,7 +1,11 @@
/*
* class.c - basic device class management
+ *
+ * Copyright (c) 2002-3 Patrick Mochel
+ * Copyright (c) 2002-3 Open Source Development Labs
*
- * Copyright (c) 2001-2003 Patrick Mochel <mochel@osdl.org>
+ * This file is released under the GPLv2
+ *
*/
#undef DEBUG
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 4069f77715a9..b43beea7e9ae 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -1,8 +1,11 @@
/*
* drivers/base/core.c - core driver model code (device registration, etc)
+ *
+ * Copyright (c) 2002-3 Patrick Mochel
+ * Copyright (c) 2002-3 Open Source Development Labs
*
- * Copyright (c) 2002 Patrick Mochel
- * 2002 Open Source Development Lab
+ * This file is released under the GPLv2
+ *
*/
#undef DEBUG
diff --git a/drivers/base/driver.c b/drivers/base/driver.c
index a7b123878ce4..7fd9d5c1d539 100644
--- a/drivers/base/driver.c
+++ b/drivers/base/driver.c
@@ -1,6 +1,11 @@
/*
* driver.c - centralized device driver management
*
+ * Copyright (c) 2002-3 Patrick Mochel
+ * Copyright (c) 2002-3 Open Source Development Labs
+ *
+ * This file is released under the GPLv2
+ *
*/
#undef DEBUG
diff --git a/drivers/base/firmware.c b/drivers/base/firmware.c
index 490f4e8f6507..886d4961498b 100644
--- a/drivers/base/firmware.c
+++ b/drivers/base/firmware.c
@@ -1,5 +1,11 @@
/*
* firmware.c - firmware subsystem hoohaw.
+ *
+ * Copyright (c) 2002-3 Patrick Mochel
+ * Copyright (c) 2002-3 Open Source Development Labs
+ *
+ * This file is released under the GPLv2
+ *
*/
#include <linux/kobject.h>
diff --git a/drivers/base/init.c b/drivers/base/init.c
index cbfd88864e70..28d38eb86734 100644
--- a/drivers/base/init.c
+++ b/drivers/base/init.c
@@ -1,3 +1,11 @@
+/*
+ *
+ * Copyright (c) 2002-3 Patrick Mochel
+ * Copyright (c) 2002-3 Open Source Development Labs
+ *
+ * This file is released under the GPLv2
+ *
+ */
#include <linux/device.h>
#include <linux/init.h>
diff --git a/drivers/base/interface.c b/drivers/base/interface.c
index 9b1c0f0f1cc5..1622db6010d2 100644
--- a/drivers/base/interface.c
+++ b/drivers/base/interface.c
@@ -1,8 +1,12 @@
/*
* drivers/base/interface.c - common driverfs interface that's exported to
* the world for all devices.
- * Copyright (c) 2002 Patrick Mochel
- * 2002 Open Source Development Lab
+ *
+ * Copyright (c) 2002-3 Patrick Mochel
+ * Copyright (c) 2002-3 Open Source Development Labs
+ *
+ * This file is released under the GPLv2
+ *
*/
#include <linux/device.h>
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index 4f76511d902e..2813a42a2f19 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -1,6 +1,11 @@
/*
* platform.c - platform 'psuedo' bus for legacy devices
*
+ * Copyright (c) 2002-3 Patrick Mochel
+ * Copyright (c) 2002-3 Open Source Development Labs
+ *
+ * This file is released under the GPLv2
+ *
* Please see Documentation/driver-model/platform.txt for more
* information.
*/
diff --git a/drivers/base/power.c b/drivers/base/power.c
index 7be60cc729f9..e389891c574d 100644
--- a/drivers/base/power.c
+++ b/drivers/base/power.c
@@ -1,14 +1,16 @@
/*
* power.c - power management functions for the device tree.
*
- * Copyright (c) 2002 Patrick Mochel
- * 2002 Open Source Development Lab
+ * Copyright (c) 2002-3 Patrick Mochel
+ * 2002-3 Open Source Development Lab
+ *
+ * This file is released under the GPLv2
*
* Kai Germaschewski contributed to the list walking routines.
*
*/
-#undef DEBUG
+#define DEBUG
#include <linux/device.h>
#include <linux/module.h>
@@ -88,10 +90,12 @@ void device_shutdown(void)
down_write(&devices_subsys.rwsem);
list_for_each(entry,&devices_subsys.kset.list) {
struct device * dev = to_dev(entry);
+ pr_debug("shutting down %s: ",dev->name);
if (dev->driver && dev->driver->shutdown) {
- pr_debug("shutting down %s\n",dev->name);
+ pr_debug("Ok\n");
dev->driver->shutdown(dev);
- }
+ } else
+ pr_debug("Ignored.\n");
}
up_write(&devices_subsys.rwsem);
}
diff --git a/drivers/base/sys.c b/drivers/base/sys.c
index 41e8a546252f..5ae457170548 100644
--- a/drivers/base/sys.c
+++ b/drivers/base/sys.c
@@ -1,8 +1,10 @@
/*
* sys.c - pseudo-bus for system 'devices' (cpus, PICs, timers, etc)
*
- * Copyright (c) 2002 Patrick Mochel
- * 2002 Open Source Development Lab
+ * Copyright (c) 2002-3 Patrick Mochel
+ * 2002-3 Open Source Development Lab
+ *
+ * This file is released under the GPLv2
*
* This exports a 'system' bus type.
* By default, a 'sys' bus gets added to the root of the system. There will
diff --git a/include/linux/device.h b/include/linux/device.h
index 441ab49ffa0b..b73a9555bcb1 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -3,21 +3,9 @@
*
* Copyright (c) 2001-2003 Patrick Mochel <mochel@osdl.org>
*
- * This is a relatively simple centralized driver model.
- * The data structures were mainly lifted directly from the PCI
- * driver model. These are thought to be the common fields that
- * are relevant to all device buses.
+ * This file is released under the GPLv2
*
- * All the devices are arranged in a tree. All devices should
- * have some sort of parent bus of whom they are children of.
- * Devices should not be direct children of the system root.
- *
- * Device drivers should not directly call the device_* routines
- * or access the contents of struct device directly. Instead,
- * abstract that from the drivers and write bus-specific wrappers
- * that do it for you.
- *
- * See Documentation/driver-model.txt for more information.
+ * See Documentation/driver-model/*.txt for more information.
*/
#ifndef _DEVICE_H_
@@ -169,6 +157,8 @@ struct class {
int (*hotplug)(struct class_device *dev, char **envp,
int num_envp, char *buffer, int buffer_size);
+
+ void (*release)(struct class_device *dev);
};
extern int class_register(struct class *);