projects/linux·commit c813b4e1

Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6

c813b4e1 · Linus Torvalds <[email protected]> · 2008-10-16 12:40:26 -07:00

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (46 commits)
  UIO: Fix mapping of logical and virtual memory
  UIO: add automata sercos3 pci card support
  UIO: Change driver name of uio_pdrv
  UIO: Add alignment warnings for uio-mem
  Driver core: add bus_sort_breadthfirst() function
  NET: convert the phy_device file to use bus_find_device_by_name
  kobject: Cleanup kobject_rename and !CONFIG_SYSFS
  kobject: Fix kobject_rename and !CONFIG_SYSFS
  sysfs: Make dir and name args to sysfs_notify() const
  platform: add new device registration helper
  sysfs: use ilookup5() instead of ilookup5_nowait()
  PNP: create device attributes via default device attributes
  Driver core: make bus_find_device_by_name() more robust
  usb: turn dev_warn+WARN_ON combos into dev_WARN
  debug: use dev_WARN() rather than WARN_ON() in device_pm_add()
  debug: Introduce a dev_WARN() function
  sysfs: fix deadlock
  device model: Do a quickcheck for driver binding before doing an expensive check
  Driver core: Fix cleanup in device_create_vargs().
  Driver core: Clarify device cleanup.
  ...
Commit
c813b4e16ead3c3df98ac84419d4df2adf33fe01
Parents
c8d8a232 · 02683ffd

Merge commit. Changes below are compared with the first parent: c8d8a232.

Changes

131 files changed · +1786 −617

FileStatusAddDelContent
Documentation/kernel-parameters.txtmodified+5−0View file
Documentation/kobject.txtmodified+4−0View file
arch/mips/kernel/rtlx.cmodified+2−2View file
arch/mips/sibyte/common/sb_tbprof.cmodified+1−2View file
arch/x86/kernel/cpuid.cmodified+2−2View file
arch/x86/kernel/dumpstack_32.cmodified+2−0View file
arch/x86/kernel/dumpstack_64.cmodified+2−0View file
arch/x86/kernel/msr.cmodified+2−2View file
block/bsg.cmodified+1−2View file
drivers/base/bus.cmodified+51−3View file
drivers/base/core.cmodified+24−6View file
drivers/base/dd.cmodified+3−0View file
drivers/base/platform.cmodified+48−1View file
drivers/base/power/main.cmodified+1−1View file
drivers/block/aoe/aoechr.cmodified+3−3View file
drivers/block/paride/pg.cmodified+2−3View file
drivers/block/paride/pt.cmodified+4−6View file
drivers/block/pktcdvd.cmodified+2−3View file
drivers/char/bsr.cmodified+2−3View file
drivers/char/dsp56k.cmodified+2−2View file
drivers/char/ip2/ip2main.cmodified+6−6View file
drivers/char/ipmi/ipmi_devintf.cmodified+1−1View file
drivers/char/istallion.cmodified+2−3View file
drivers/char/lp.cmodified+2−2View file
drivers/char/mem.cmodified+3−3View file
drivers/char/misc.cmodified+2−2View file
drivers/char/pcmcia/cm4000_cs.cmodified+1−1View file
drivers/char/pcmcia/cm4040_cs.cmodified+1−2View file
drivers/char/ppdev.cmodified+2−3View file
drivers/char/raw.cmodified+3−4View file
drivers/char/snsc.cmodified+2−2View file
drivers/char/stallion.cmodified+2−2View file
drivers/char/tty_io.cmodified+1−1View file
drivers/char/vc_screen.cmodified+6−6View file
drivers/char/viotape.cmodified+4−4View file
drivers/char/xilinx_hwicap/xilinx_hwicap.cmodified+1−2View file
drivers/dca/dca-sysfs.cmodified+3−5View file
drivers/firmware/iscsi_ibft.cmodified+9−9View file
drivers/hid/hidraw.cmodified+2−3View file
drivers/hwmon/hwmon.cmodified+2−2View file
drivers/i2c/i2c-dev.cmodified+3−3View file
drivers/ide/ide-probe.cmodified+2−2View file
drivers/ide/ide-tape.cmodified+5−6View file
drivers/ieee1394/dv1394.cmodified+4−4View file
drivers/ieee1394/raw1394.cmodified+4−4View file
drivers/ieee1394/video1394.cmodified+2−3View file
drivers/infiniband/core/cm.cmodified+3−3View file
drivers/infiniband/core/user_mad.cmodified+6−6View file
drivers/infiniband/core/uverbs_main.cmodified+3−6View file
drivers/infiniband/hw/ipath/ipath_file_ops.cmodified+1−1View file
drivers/isdn/capi/capi.cmodified+1−2View file
drivers/leds/led-class.cmodified+2−2View file
drivers/macintosh/adb.cmodified+1−2View file
drivers/media/dvb/dvb-core/dvbdev.cmodified+1−1View file
drivers/misc/phantom.cmodified+3−3View file
drivers/mtd/mtdchar.cmodified+4−6View file
drivers/net/phy/phy_device.cmodified+1−7View file
drivers/net/ppp_generic.cmodified+2−2View file
drivers/net/wan/cosa.cmodified+2−2View file
drivers/net/wireless/mac80211_hwsim.cmodified+3−3View file
drivers/pci/probe.cmodified+5−45View file
drivers/pnp/base.hmodified+1−1View file
drivers/pnp/core.cmodified+1−9View file
drivers/pnp/driver.cmodified+1−0View file
drivers/pnp/interface.cmodified+8−29View file
drivers/power/power_supply_core.cmodified+2−2View file
drivers/s390/char/raw3270.cmodified+6−8View file
drivers/s390/char/tape_class.cmodified+3−3View file
drivers/s390/char/vmlogrdr.cmodified+4−4View file
drivers/s390/char/vmur.cmodified+2−3View file
drivers/scsi/ch.cmodified+3−3View file
drivers/scsi/dpt_i2o.cmodified+1−1View file
drivers/scsi/osst.cmodified+2−1View file
drivers/scsi/sg.cmodified+4−6View file
drivers/scsi/st.cmodified+4−7View file
drivers/spi/spidev.cmodified+3−4View file
drivers/uio/Kconfigmodified+13−0View file
drivers/uio/Makefilemodified+1−0View file
drivers/uio/uio.cmodified+21−5View file
drivers/uio/uio_pdrv.cmodified+1−1View file
drivers/uio/uio_sercos3.cadded+243−0View file
drivers/usb/core/devio.cmodified+3−3View file
drivers/usb/core/file.cmodified+3−3View file
drivers/usb/core/hcd.cmodified+2−3View file
drivers/usb/gadget/Makefilemodified+7−16View file
drivers/usb/gadget/cdc2.cmodified+23−2View file
drivers/usb/gadget/ether.cmodified+26−2View file
drivers/usb/gadget/f_ecm.cmodified+54−54View file
drivers/usb/gadget/f_loopback.cmodified+18−16View file
drivers/usb/gadget/f_subset.cmodified+22−22View file
drivers/usb/gadget/file_storage.cmodified+12−0View file
drivers/usb/gadget/gmidi.cmodified+15−0View file
drivers/usb/gadget/printer.cmodified+16−2View file
drivers/usb/gadget/rndis.cmodified+55−60View file
drivers/usb/gadget/serial.cmodified+18−0View file
drivers/usb/gadget/u_ether.cmodified+2−2View file
drivers/usb/gadget/zero.cmodified+17−0View file
drivers/usb/host/uhci-q.cmodified+8−16View file
drivers/usb/misc/phidgetkit.cmodified+2−3View file
drivers/usb/misc/phidgetmotorcontrol.cmodified+2−3View file
drivers/usb/misc/phidgetservo.cmodified+2−3View file
drivers/usb/mon/mon_bin.cmodified+3−3View file
drivers/video/console/fbcon.cmodified+2−2View file
drivers/video/display/display-sysfs.cmodified+3−6View file
drivers/video/fbmem.cmodified+2−3View file
fs/coda/psdev.cmodified+2−3View file
fs/sysfs/bin.cmodified+31−11View file
fs/sysfs/dir.cmodified+10−14View file
fs/sysfs/file.cmodified+32−14View file
fs/sysfs/mount.cmodified+15−0View file
fs/sysfs/sysfs.hmodified+4−2View file
include/asm-generic/vmlinux.lds.hmodified+9−1View file
include/linux/device.hmodified+16−2View file
include/linux/dynamic_printk.hadded+93−0View file
include/linux/kernel.hmodified+6−1View file
include/linux/module.hmodified+0−1View file
include/linux/platform_device.hmodified+2−0View file
include/linux/sysfs.hmodified+32−4View file
kernel/module.cmodified+32−1View file
lib/Kconfig.debugmodified+55−0View file
lib/Makefilemodified+2−0View file
lib/dynamic_printk.cadded+418−0View file
lib/kobject.cmodified+20−15View file
net/netfilter/nf_conntrack_pptp.cmodified+1−1View file
scripts/Makefile.libmodified+10−1View file
scripts/basic/Makefilemodified+1−1View file
scripts/basic/hash.cadded+64−0View file
sound/core/init.cmodified+3−3View file
sound/core/sound.cmodified+2−3View file
sound/oss/soundcard.cmodified+7−8View file
sound/sound_core.cmodified+2−3View file

Only the first 600 diff lines are shown. Download the complete patch.

Documentation/kernel-parameters.txt

View file
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 82c561f..dd28a0d 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1714,6 +1714,11 @@ and is between 256 and 4096 characters. It is defined in the file
autoconfiguration.
Ranges are in pairs (memory base and size).
+ dynamic_printk
+ Enables pr_debug()/dev_dbg() calls if
+ CONFIG_DYNAMIC_PRINTK_DEBUG has been enabled. These can also
+ be switched on/off via <debugfs>/dynamic_printk/modules
+
print-fatal-signals=
[KNL] debug: print fatal signals
print-fatal-signals=1: print segfault info to

Documentation/kobject.txt

View file
diff --git a/Documentation/kobject.txt b/Documentation/kobject.txt
index 51a8021..f5d2aad 100644
--- a/Documentation/kobject.txt
+++ b/Documentation/kobject.txt
@@ -118,6 +118,10 @@ the name of the kobject, call kobject_rename():
int kobject_rename(struct kobject *kobj, const char *new_name);
+Note kobject_rename does perform any locking or have a solid notion of
+what names are valid so the provide must provide their own sanity checking
+and serialization.
+
There is a function called kobject_set_name() but that is legacy cruft and
is being removed. If your code needs to call this function, it is
incorrect and needs to be fixed.

arch/mips/kernel/rtlx.c

View file
diff --git a/arch/mips/kernel/rtlx.c b/arch/mips/kernel/rtlx.c
index dfd868b..4ce93aa 100644
--- a/arch/mips/kernel/rtlx.c
+++ b/arch/mips/kernel/rtlx.c
@@ -522,8 +522,8 @@ static int __init rtlx_module_init(void)
atomic_set(&channel_wqs[i].in_open, 0);
mutex_init(&channel_wqs[i].mutex);
- dev = device_create_drvdata(mt_class, NULL, MKDEV(major, i),
- NULL, "%s%d", module_name, i);
+ dev = device_create(mt_class, NULL, MKDEV(major, i), NULL,
+ "%s%d", module_name, i);
if (IS_ERR(dev)) {
err = PTR_ERR(dev);
goto out_chrdev;

arch/mips/sibyte/common/sb_tbprof.c

View file
diff --git a/arch/mips/sibyte/common/sb_tbprof.c b/arch/mips/sibyte/common/sb_tbprof.c
index 66e3e3f..637a194 100644
--- a/arch/mips/sibyte/common/sb_tbprof.c
+++ b/arch/mips/sibyte/common/sb_tbprof.c
@@ -576,8 +576,7 @@ static int __init sbprof_tb_init(void)
tb_class = tbc;
- dev = device_create_drvdata(tbc, NULL, MKDEV(SBPROF_TB_MAJOR, 0),
- NULL, "tb");
+ dev = device_create(tbc, NULL, MKDEV(SBPROF_TB_MAJOR, 0), NULL, "tb");
if (IS_ERR(dev)) {
err = PTR_ERR(dev);
goto out_class;

arch/x86/kernel/cpuid.c

View file
diff --git a/arch/x86/kernel/cpuid.c b/arch/x86/kernel/cpuid.c
index 6a44d64..72cefd1 100644
--- a/arch/x86/kernel/cpuid.c
+++ b/arch/x86/kernel/cpuid.c
@@ -147,8 +147,8 @@ static __cpuinit int cpuid_device_create(int cpu)
{
struct device *dev;
- dev = device_create_drvdata(cpuid_class, NULL, MKDEV(CPUID_MAJOR, cpu),
- NULL, "cpu%d", cpu);
+ dev = device_create(cpuid_class, NULL, MKDEV(CPUID_MAJOR, cpu), NULL,
+ "cpu%d", cpu);
return IS_ERR(dev) ? PTR_ERR(dev) : 0;
}

arch/x86/kernel/dumpstack_32.c

View file
diff --git a/arch/x86/kernel/dumpstack_32.c b/arch/x86/kernel/dumpstack_32.c
index 201ee35..1a78180 100644
--- a/arch/x86/kernel/dumpstack_32.c
+++ b/arch/x86/kernel/dumpstack_32.c
@@ -13,6 +13,7 @@
#include <linux/kexec.h>
#include <linux/bug.h>
#include <linux/nmi.h>
+#include <linux/sysfs.h>
#include <asm/stacktrace.h>
@@ -343,6 +344,7 @@ int __kprobes __die(const char *str, struct pt_regs *regs, long err)
printk("DEBUG_PAGEALLOC");
#endif
printk("\n");
+ sysfs_printk_last_file();
if (notify_die(DIE_OOPS, str, regs, err,
current->thread.trap_no, SIGSEGV) == NOTIFY_STOP)
return 1;

arch/x86/kernel/dumpstack_64.c

View file
diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c
index 086cc81..96a5db7 100644
--- a/arch/x86/kernel/dumpstack_64.c
+++ b/arch/x86/kernel/dumpstack_64.c
@@ -13,6 +13,7 @@
#include <linux/kexec.h>
#include <linux/bug.h>
#include <linux/nmi.h>
+#include <linux/sysfs.h>
#include <asm/stacktrace.h>
@@ -489,6 +490,7 @@ int __kprobes __die(const char *str, struct pt_regs *regs, long err)
printk("DEBUG_PAGEALLOC");
#endif
printk("\n");
+ sysfs_printk_last_file();
if (notify_die(DIE_OOPS, str, regs, err,
current->thread.trap_no, SIGSEGV) == NOTIFY_STOP)
return 1;

arch/x86/kernel/msr.c

View file
diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c
index 2e2af5d..82a7c7e 100644
--- a/arch/x86/kernel/msr.c
+++ b/arch/x86/kernel/msr.c
@@ -163,8 +163,8 @@ static int __cpuinit msr_device_create(int cpu)
{
struct device *dev;
- dev = device_create_drvdata(msr_class, NULL, MKDEV(MSR_MAJOR, cpu),
- NULL, "msr%d", cpu);
+ dev = device_create(msr_class, NULL, MKDEV(MSR_MAJOR, cpu), NULL,
+ "msr%d", cpu);
return IS_ERR(dev) ? PTR_ERR(dev) : 0;
}

block/bsg.c

View file
diff --git a/block/bsg.c b/block/bsg.c
index 56cb343..034112b 100644
--- a/block/bsg.c
+++ b/block/bsg.c
@@ -1024,8 +1024,7 @@ int bsg_register_queue(struct request_queue *q, struct device *parent,
bcd->release = release;
kref_init(&bcd->ref);
dev = MKDEV(bsg_major, bcd->minor);
- class_dev = device_create_drvdata(bsg_class, parent, dev, NULL,
- "%s", devname);
+ class_dev = device_create(bsg_class, parent, dev, NULL, "%s", devname);
if (IS_ERR(class_dev)) {
ret = PTR_ERR(class_dev);
goto put_dev;

drivers/base/bus.c

View file
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index ef522ae..5aee1c0 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -333,9 +333,7 @@ static int match_name(struct device *dev, void *data)
{
const char *name = data;
- if (strcmp(name, dev->bus_id) == 0)
- return 1;
- return 0;
+ return sysfs_streq(name, dev->bus_id);
}
/**
@@ -982,6 +980,56 @@ struct klist *bus_get_device_klist(struct bus_type *bus)
}
EXPORT_SYMBOL_GPL(bus_get_device_klist);
+/*
+ * Yes, this forcably breaks the klist abstraction temporarily. It
+ * just wants to sort the klist, not change reference counts and
+ * take/drop locks rapidly in the process. It does all this while
+ * holding the lock for the list, so objects can't otherwise be
+ * added/removed while we're swizzling.
+ */
+static void device_insertion_sort_klist(struct device *a, struct list_head *list,
+ int (*compare)(const struct device *a,
+ const struct device *b))
+{
+ struct list_head *pos;
+ struct klist_node *n;
+ struct device *b;
+
+ list_for_each(pos, list) {
+ n = container_of(pos, struct klist_node, n_node);
+ b = container_of(n, struct device, knode_bus);
+ if (compare(a, b) <= 0) {
+ list_move_tail(&a->knode_bus.n_node,
+ &b->knode_bus.n_node);
+ return;
+ }
+ }
+ list_move_tail(&a->knode_bus.n_node, list);
+}
+
+void bus_sort_breadthfirst(struct bus_type *bus,
+ int (*compare)(const struct device *a,
+ const struct device *b))
+{
+ LIST_HEAD(sorted_devices);
+ struct list_head *pos, *tmp;
+ struct klist_node *n;
+ struct device *dev;
+ struct klist *device_klist;
+
+ device_klist = bus_get_device_klist(bus);
+
+ spin_lock(&device_klist->k_lock);
+ list_for_each_safe(pos, tmp, &device_klist->k_list) {
+ n = container_of(pos, struct klist_node, n_node);
+ dev = container_of(n, struct device, knode_bus);
+ device_insertion_sort_klist(dev, &sorted_devices, compare);
+ }
+ list_splice(&sorted_devices, &device_klist->k_list);
+ spin_unlock(&device_klist->k_lock);
+}
+EXPORT_SYMBOL_GPL(bus_sort_breadthfirst);
+
int __init buses_init(void)
{
bus_kset = kset_create_and_add("bus", &bus_uevent_ops, NULL);

drivers/base/core.c

View file
diff --git a/drivers/base/core.c b/drivers/base/core.c
index b98cb14..8c2cc26 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -523,11 +523,16 @@ static void klist_children_put(struct klist_node *n)
* device_initialize - init device structure.
* @dev: device.
*
- * This prepares the device for use by other layers,
- * including adding it to the device hierarchy.
+ * This prepares the device for use by other layers by initializing
+ * its fields.
* It is the first half of device_register(), if called by
- * that, though it can also be called separately, so one
- * may use @dev's fields (e.g. the refcount).
+ * that function, though it can also be called separately, so one
+ * may use @dev's fields. In particular, get_device()/put_device()
+ * may be used for reference counting of @dev after calling this
+ * function.
+ *
+ * NOTE: Use put_device() to give up your reference instead of freeing
+ * @dev directly once you have called this function.
*/
void device_initialize(struct device *dev)
{
@@ -835,9 +840,13 @@ static void device_remove_sys_dev_entry(struct device *dev)
* This is part 2 of device_register(), though may be called
* separately _iff_ device_initialize() has been called separately.
*
- * This adds it to the kobject hierarchy via kobject_add(), adds it
+ * This adds @dev to the kobject hierarchy via kobject_add(), adds it
* to the global and sibling lists for the device, then
* adds it to the other relevant subsystems of the driver model.
+ *
+ * NOTE: _Never_ directly free @dev after calling this function, even
+ * if it returned an error! Always use put_device() to give up your
+ * reference instead.
*/
int device_add(struct device *dev)
{
@@ -965,6 +974,10 @@ done:
* I.e. you should only call the two helpers separately if
* have a clearly defined need to use and refcount the device
* before it is added to the hierarchy.
+ *
+ * NOTE: _Never_ directly free @dev after calling this function, even
+ * if it returned an error! Always use put_device() to give up the
+ * reference initialized in this function instead.
*/
int device_register(struct device *dev)
{
@@ -1243,7 +1256,7 @@ struct device *device_create_vargs(struct class *class, struct device *parent,
return dev;
error:
- kfree(dev);
+ put_device(dev);
return ERR_PTR(retval);
}
EXPORT_SYMBOL_GPL(device_create_vargs);
@@ -1314,6 +1327,11 @@ EXPORT_SYMBOL_GPL(device_destroy);
* device_rename - renames a device
* @dev: the pointer to the struct device to be renamed
* @new_name: the new name of the device
+ *
+ * It is the responsibility of the caller to provide mutual
+ * exclusion between two different calls of device_rename
+ * on the same device to ensure that new_name is valid and
+ * won't conflict with other devices.
*/
int device_rename(struct device *dev, char *new_name)
{

drivers/base/dd.c

View file
diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index 3ac443b..20febc0 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -257,6 +257,9 @@ static int __driver_attach(struct device *dev, void *data)
* is an error.
*/
+ if (drv->bus->match && !drv->bus->match(dev, drv))
+ return 0;
+
if (dev->parent) /* Needed for USB */
down(&dev->parent->sem);
down(&dev->sem);

drivers/base/platform.c

View file
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index 66b710c..dfcbfe5 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -394,6 +394,53 @@ error:
}
EXPORT_SYMBOL_GPL(platform_device_register_simple);
+/**
+ * platform_device_register_data
+ * @parent: parent device for the device we're adding
+ * @name: base name of the device we're adding
+ * @id: instance id
+ * @data: platform specific data for this platform device
+ * @size: size of platform specific data
+ *
+ * This function creates a simple platform device that requires minimal
+ * resource and memory management. Canned release function freeing memory
+ * allocated for the device allows drivers using such devices to be
+ * unloaded without waiting for the last reference to the device to be
+ * dropped.
+ */
+struct platform_device *platform_device_register_data(
+ struct device *parent,
+ const char *name, int id,
+ const void *data, size_t size)
+{
+ struct platform_device *pdev;
+ int retval;
+
+ pdev = platform_device_alloc(name, id);
+ if (!pdev) {
+ retval = -ENOMEM;
+ goto error;
+ }
+
+ pdev->dev.parent = parent;
+
+ if (size) {
+ retval = platform_device_add_data(pdev, data, size);
+ if (retval)
+ goto error;
+ }
+
+ retval = platform_device_add(pdev);
+ if (retval)
+ goto error;
+
+ return pdev;
+
+error:
+ platform_device_put(pdev);
+ return ERR_PTR(retval);
+}
+
static int platform_drv_probe(struct device *_dev)
{
struct platform_driver *drv = to_platform_driver(_dev->driver);
@@ -865,7 +912,7 @@ static int platform_pm_restore_noirq(struct device *dev)
#endif /* !CONFIG_HIBERNATION */
-struct pm_ext_ops platform_pm_ops = {
+static struct pm_ext_ops platform_pm_ops = {
.base = {
.prepare = platform_pm_prepare,
.complete = platform_pm_complete,

drivers/base/power/main.c

View file
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index 03bde75..692c20b 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -83,7 +83,7 @@ void device_pm_add(struct device *dev)
* transition is in progress in order to avoid leaving them
* unhandled down the road
*/
- WARN_ON(true);
+ dev_WARN(dev, "Parentless device registered during a PM transaction\n");
}
list_add_tail(&dev->power.entry, &dpm_list);

drivers/block/aoe/aoechr.c

View file
diff --git a/drivers/block/aoe/aoechr.c b/drivers/block/aoe/aoechr.c
index 1f56d2c..200efc4 100644
--- a/drivers/block/aoe/aoechr.c
+++ b/drivers/block/aoe/aoechr.c
@@ -284,9 +284,9 @@ aoechr_init(void)
return PTR_ERR(aoe_class);
}
for (i = 0; i < ARRAY_SIZE(chardevs); ++i)
- device_create_drvdata(aoe_class, NULL,
- MKDEV(AOE_MAJOR, chardevs[i].minor),
- NULL, chardevs[i].name);
+ device_create(aoe_class, NULL,
+ MKDEV(AOE_MAJOR, chardevs[i].minor), NULL,
+ chardevs[i].name);
return 0;
}

drivers/block/paride/pg.c

View file
diff --git a/drivers/block/paride/pg.c b/drivers/block/paride/pg.c
index d731ca4..9dfa271 100644
--- a/drivers/block/paride/pg.c
+++ b/drivers/block/paride/pg.c
@@ -686,9 +686,8 @@ static int __init pg_init(void)
for (unit = 0; unit < PG_UNITS; unit++) {
struct pg *dev = &devices[unit];
if (dev->present)
- device_create_drvdata(pg_class, NULL,
- MKDEV(major, unit), NULL,
- "pg%u", unit);
+ device_create(pg_class, NULL, MKDEV(major, unit), NULL,
+ "pg%u", unit);
}
err = 0;
goto out;

drivers/block/paride/pt.c

View file
diff --git a/drivers/block/paride/pt.c b/drivers/block/paride/pt.c
index 673b8b2..5ae2296 100644
--- a/drivers/block/paride/pt.c
+++ b/drivers/block/paride/pt.c
@@ -979,12 +979,10 @@ static int __init pt_init(void)
for (unit = 0; unit < PT_UNITS; unit++)
if (pt[unit].present) {
- device_create_drvdata(pt_class, NULL,
- MKDEV(major, unit), NULL,
- "pt%d", unit);
- device_create_drvdata(pt_class, NULL,
- MKDEV(major, unit + 128), NULL,
- "pt%dn", unit);
+ device_create(pt_class, NULL, MKDEV(major, unit), NULL,
+ "pt%d", unit);
+ device_create(pt_class, NULL, MKDEV(major, unit + 128),
+ NULL, "pt%dn", unit);
}
goto out;

drivers/block/pktcdvd.c

View file
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index 0e07715..195ca7c 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -302,9 +302,8 @@ static struct kobj_type kobj_pkt_type_wqueue = {
static void pkt_sysfs_dev_new(struct pktcdvd_device *pd)
{
if (class_pktcdvd) {
- pd->dev = device_create_drvdata(class_pktcdvd, NULL,
- pd->pkt_dev, NULL,
- "%s", pd->name);
+ pd->dev = device_create(class_pktcdvd, NULL, pd->pkt_dev, NULL,
+ "%s", pd->name);
if (IS_ERR(pd->dev))
pd->dev = NULL;
}

drivers/char/bsr.c

View file
diff --git a/drivers/char/bsr.c b/drivers/char/bsr.c
index b650b4e..456f54d 100644
--- a/drivers/char/bsr.c
+++ b/drivers/char/bsr.c
@@ -229,9 +229,8 @@ static int bsr_create_devs(struct device_node *bn)
if (result)
goto out_err;
- cur->bsr_device = device_create_drvdata(bsr_class, NULL,
- cur->bsr_dev,
- cur, cur->bsr_name);
+ cur->bsr_device = device_create(bsr_class, NULL, cur->bsr_dev,
+ cur, cur->bsr_name);
if (!cur->bsr_device) {
printk(KERN_ERR "device_create failed for %s\n",
cur->bsr_name);

drivers/char/dsp56k.c

View file
diff --git a/drivers/char/dsp56k.c b/drivers/char/dsp56k.c
index ca7c72a..85832ab 100644
--- a/drivers/char/dsp56k.c
+++ b/drivers/char/dsp56k.c
@@ -508,8 +508,8 @@ static int __init dsp56k_init_driver(void)
err = PTR_ERR(dsp56k_class);
goto out_chrdev;
}
- device_create_drvdata(dsp56k_class, NULL, MKDEV(DSP56K_MAJOR, 0),
- NULL, "dsp56k");
+ device_create(dsp56k_class, NULL, MKDEV(DSP56K_MAJOR, 0), NULL,
+ "dsp56k");
printk(banner);
goto out;

drivers/char/ip2/ip2main.c

View file
diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c
index 6774572..70e0ebc 100644
--- a/drivers/char/ip2/ip2main.c
+++ b/drivers/char/ip2/ip2main.c
@@ -745,12 +745,12 @@ static int __init ip2_loadmain(void)
pB = i2BoardPtrTable[i];
if (pB != NULL) {
- device_create_drvdata(ip2_class, NULL,
- MKDEV(IP2_IPL_MAJOR, 4 * i),
- NULL, "ipl%d", i);
- device_create_drvdata(ip2_class, NULL,
- MKDEV(IP2_IPL_MAJOR, 4 * i + 1),
- NULL, "stat%d", i);
+ device_create(ip2_class, NULL,
+ MKDEV(IP2_IPL_MAJOR, 4 * i),
+ NULL, "ipl%d", i);
+ device_create(ip2_class, NULL,
+ MKDEV(IP2_IPL_MAJOR, 4 * i + 1),
+ NULL, "stat%d", i);
for (box = 0; box < ABS_MAX_BOXES; box++)
for (j = 0; j < ABS_BIGGEST_BOX; j++)

drivers/char/ipmi/ipmi_devintf.c

View file
diff --git a/drivers/char/ipmi/ipmi_devintf.c b/drivers/char/ipmi/ipmi_devintf.c
index 64e1c16..835a33c 100644
--- a/drivers/char/ipmi/ipmi_devintf.c
+++ b/drivers/char/ipmi/ipmi_devintf.c
@@ -871,7 +871,7 @@ static void ipmi_new_smi(int if_num, struct device *device)
entry->dev = dev;
mutex_lock(&reg_list_mutex);
- device_create_drvdata(ipmi_class, device, dev, NULL, "ipmi%d", if_num);
+ device_create(ipmi_class, device, dev, NULL, "ipmi%d", if_num);
list_add(&entry->link, &reg_list);
mutex_unlock(&reg_list_mutex);
}

drivers/char/istallion.c

View file
diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c
index 505d7a1..44e5d60 100644
--- a/drivers/char/istallion.c
+++ b/drivers/char/istallion.c
@@ -4600,9 +4600,8 @@ static int __init istallion_module_init(void)
istallion_class = class_create(THIS_MODULE, "staliomem");
for (i = 0; i < 4; i++)
- device_create_drvdata(istallion_class, NULL,
- MKDEV(STL_SIOMEMMAJOR, i),
- NULL, "staliomem%d", i);
+ device_create(istallion_class, NULL, MKDEV(STL_SIOMEMMAJOR, i),
+ NULL, "staliomem%d", i);
return 0;
err_deinit:

drivers/char/lp.c

View file
diff --git a/drivers/char/lp.c b/drivers/char/lp.c
index 3f2719b..e444c2d 100644
--- a/drivers/char/lp.c
+++ b/drivers/char/lp.c
@@ -813,8 +813,8 @@ static int lp_register(int nr, struct parport *port)
if (reset)
lp_reset(nr);
- device_create_drvdata(lp_class, port->dev, MKDEV(LP_MAJOR, nr), NULL,
- "lp%d", nr);
+ device_create(lp_class, port->dev, MKDEV(LP_MAJOR, nr), NULL,
+ "lp%d", nr);
printk(KERN_INFO "lp%d: using %s (%s).\n", nr, port->name,
(port->irq == PARPORT_IRQ_NONE)?"polling":"interrupt-driven");

drivers/char/mem.c

View file
diff --git a/drivers/char/mem.c b/drivers/char/mem.c
index 672b08e..6431f69 100644
--- a/drivers/char/mem.c
+++ b/drivers/char/mem.c
@@ -992,9 +992,9 @@ static int __init chr_dev_init(void)
mem_class = class_create(THIS_MODULE, "mem");
for (i = 0; i < ARRAY_SIZE(devlist); i++)
- device_create_drvdata(mem_class, NULL,
- MKDEV(MEM_MAJOR, devlist[i].minor),
- NULL, devlist[i].name);
+ device_create(mem_class, NULL,
+ MKDEV(MEM_MAJOR, devlist[i].minor), NULL,
+ devlist[i].name);
return 0;
}

drivers/char/misc.c

View file
diff --git a/drivers/char/misc.c b/drivers/char/misc.c
index 999aa77..a5e0db9 100644
--- a/drivers/char/misc.c
+++ b/drivers/char/misc.c
@@ -217,8 +217,8 @@ int misc_register(struct miscdevice * misc)
misc_minors[misc->minor >> 3] |= 1 << (misc->minor & 7);
dev = MKDEV(MISC_MAJOR, misc->minor);
- misc->this_device = device_create_drvdata(misc_class, misc->parent,
- dev, NULL, "%s", misc->name);
+ misc->this_device = device_create(misc_class, misc->parent, dev, NULL,
+ "%s", misc->name);
if (IS_ERR(misc->this_device)) {
err = PTR_ERR(misc->this_device);
goto out;

drivers/char/pcmcia/cm4000_cs.c

View file
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c
index 1c5bf99..dbb9125 100644
--- a/drivers/char/pcmcia/cm4000_cs.c
+++ b/drivers/char/pcmcia/cm4000_cs.c
@@ -1871,7 +1871,7 @@ static int cm4000_probe(struct pcmcia_device *link)
return ret;
}
- device_create_drvdata(cmm_class, NULL, MKDEV(major, i), NULL, "cmm%d", i);
+ device_create(cmm_class, NULL, MKDEV(major, i), NULL, "cmm%d", i);
return 0;
}

drivers/char/pcmcia/cm4040_cs.c

View file
diff --git a/drivers/char/pcmcia/cm4040_cs.c b/drivers/char/pcmcia/cm4040_cs.c
index 2d7c906..4f0723b 100644
--- a/drivers/char/pcmcia/cm4040_cs.c
+++ b/drivers/char/pcmcia/cm4040_cs.c
@@ -637,8 +637,7 @@ static int reader_probe(struct pcmcia_device *link)

This diff is incomplete. Download the complete patch.

drivers/char/ppdev.c

View file

This diff is incomplete. Download the complete patch.

drivers/char/raw.c

View file

This diff is incomplete. Download the complete patch.

drivers/char/snsc.c

View file

This diff is incomplete. Download the complete patch.

drivers/char/stallion.c

View file

This diff is incomplete. Download the complete patch.

drivers/char/tty_io.c

View file

This diff is incomplete. Download the complete patch.

drivers/char/vc_screen.c

View file

This diff is incomplete. Download the complete patch.

drivers/char/viotape.c

View file

This diff is incomplete. Download the complete patch.

drivers/char/xilinx_hwicap/xilinx_hwicap.c

View file

This diff is incomplete. Download the complete patch.

drivers/dca/dca-sysfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/firmware/iscsi_ibft.c

View file

This diff is incomplete. Download the complete patch.

drivers/hid/hidraw.c

View file

This diff is incomplete. Download the complete patch.

drivers/hwmon/hwmon.c

View file

This diff is incomplete. Download the complete patch.

drivers/i2c/i2c-dev.c

View file

This diff is incomplete. Download the complete patch.

drivers/ide/ide-probe.c

View file

This diff is incomplete. Download the complete patch.

drivers/ide/ide-tape.c

View file

This diff is incomplete. Download the complete patch.

drivers/ieee1394/dv1394.c

View file

This diff is incomplete. Download the complete patch.

drivers/ieee1394/raw1394.c

View file

This diff is incomplete. Download the complete patch.

drivers/ieee1394/video1394.c

View file

This diff is incomplete. Download the complete patch.

drivers/infiniband/core/cm.c

View file

This diff is incomplete. Download the complete patch.

drivers/infiniband/core/user_mad.c

View file

This diff is incomplete. Download the complete patch.

drivers/infiniband/core/uverbs_main.c

View file

This diff is incomplete. Download the complete patch.

drivers/infiniband/hw/ipath/ipath_file_ops.c

View file

This diff is incomplete. Download the complete patch.

drivers/isdn/capi/capi.c

View file

This diff is incomplete. Download the complete patch.

drivers/leds/led-class.c

View file

This diff is incomplete. Download the complete patch.

drivers/macintosh/adb.c

View file

This diff is incomplete. Download the complete patch.

drivers/media/dvb/dvb-core/dvbdev.c

View file

This diff is incomplete. Download the complete patch.

drivers/misc/phantom.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/mtdchar.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/phy/phy_device.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ppp_generic.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/wan/cosa.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/wireless/mac80211_hwsim.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/probe.c

View file

This diff is incomplete. Download the complete patch.

drivers/pnp/base.h

View file

This diff is incomplete. Download the complete patch.

drivers/pnp/core.c

View file

This diff is incomplete. Download the complete patch.

drivers/pnp/driver.c

View file

This diff is incomplete. Download the complete patch.

drivers/pnp/interface.c

View file

This diff is incomplete. Download the complete patch.

drivers/power/power_supply_core.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/char/raw3270.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/char/tape_class.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/char/vmlogrdr.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/char/vmur.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/ch.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/dpt_i2o.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/osst.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/sg.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/st.c

View file

This diff is incomplete. Download the complete patch.

drivers/spi/spidev.c

View file

This diff is incomplete. Download the complete patch.

drivers/uio/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/uio/Makefile

View file

This diff is incomplete. Download the complete patch.

drivers/uio/uio.c

View file

This diff is incomplete. Download the complete patch.

drivers/uio/uio_pdrv.c

View file

This diff is incomplete. Download the complete patch.

drivers/uio/uio_sercos3.c

View file

This diff is incomplete. Download the complete patch.

drivers/usb/core/devio.c

View file

This diff is incomplete. Download the complete patch.

drivers/usb/core/file.c

View file

This diff is incomplete. Download the complete patch.

drivers/usb/core/hcd.c

View file

This diff is incomplete. Download the complete patch.

drivers/usb/gadget/Makefile

View file

This diff is incomplete. Download the complete patch.

drivers/usb/gadget/cdc2.c

View file

This diff is incomplete. Download the complete patch.

drivers/usb/gadget/ether.c

View file

This diff is incomplete. Download the complete patch.

drivers/usb/gadget/f_ecm.c

View file

This diff is incomplete. Download the complete patch.

drivers/usb/gadget/f_loopback.c

View file

This diff is incomplete. Download the complete patch.

drivers/usb/gadget/f_subset.c

View file

This diff is incomplete. Download the complete patch.

drivers/usb/gadget/file_storage.c

View file

This diff is incomplete. Download the complete patch.

drivers/usb/gadget/gmidi.c

View file

This diff is incomplete. Download the complete patch.

drivers/usb/gadget/printer.c

View file

This diff is incomplete. Download the complete patch.

drivers/usb/gadget/rndis.c

View file

This diff is incomplete. Download the complete patch.

drivers/usb/gadget/serial.c

View file

This diff is incomplete. Download the complete patch.

drivers/usb/gadget/u_ether.c

View file

This diff is incomplete. Download the complete patch.

drivers/usb/gadget/zero.c

View file

This diff is incomplete. Download the complete patch.

drivers/usb/host/uhci-q.c

View file

This diff is incomplete. Download the complete patch.

drivers/usb/misc/phidgetkit.c

View file

This diff is incomplete. Download the complete patch.

drivers/usb/misc/phidgetmotorcontrol.c

View file

This diff is incomplete. Download the complete patch.

drivers/usb/misc/phidgetservo.c

View file

This diff is incomplete. Download the complete patch.

drivers/usb/mon/mon_bin.c

View file

This diff is incomplete. Download the complete patch.

drivers/video/console/fbcon.c

View file

This diff is incomplete. Download the complete patch.

drivers/video/display/display-sysfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/video/fbmem.c

View file

This diff is incomplete. Download the complete patch.

fs/coda/psdev.c

View file

This diff is incomplete. Download the complete patch.

fs/sysfs/bin.c

View file

This diff is incomplete. Download the complete patch.

fs/sysfs/dir.c

View file

This diff is incomplete. Download the complete patch.

fs/sysfs/file.c

View file

This diff is incomplete. Download the complete patch.

fs/sysfs/mount.c

View file

This diff is incomplete. Download the complete patch.

fs/sysfs/sysfs.h

View file

This diff is incomplete. Download the complete patch.

include/asm-generic/vmlinux.lds.h

View file

This diff is incomplete. Download the complete patch.

include/linux/device.h

View file

This diff is incomplete. Download the complete patch.

include/linux/dynamic_printk.h

View file

This diff is incomplete. Download the complete patch.

include/linux/kernel.h

View file

This diff is incomplete. Download the complete patch.

include/linux/module.h

View file

This diff is incomplete. Download the complete patch.

include/linux/platform_device.h

View file

This diff is incomplete. Download the complete patch.

include/linux/sysfs.h

View file

This diff is incomplete. Download the complete patch.

kernel/module.c

View file

This diff is incomplete. Download the complete patch.

lib/Kconfig.debug

View file

This diff is incomplete. Download the complete patch.

lib/Makefile

View file

This diff is incomplete. Download the complete patch.

lib/dynamic_printk.c

View file

This diff is incomplete. Download the complete patch.

lib/kobject.c

View file

This diff is incomplete. Download the complete patch.

net/netfilter/nf_conntrack_pptp.c

View file

This diff is incomplete. Download the complete patch.

scripts/Makefile.lib

View file

This diff is incomplete. Download the complete patch.

scripts/basic/Makefile

View file

This diff is incomplete. Download the complete patch.

scripts/basic/hash.c

View file

This diff is incomplete. Download the complete patch.

sound/core/init.c

View file

This diff is incomplete. Download the complete patch.

sound/core/sound.c

View file

This diff is incomplete. Download the complete patch.

sound/oss/soundcard.c

View file

This diff is incomplete. Download the complete patch.

sound/sound_core.c

View file

This diff is incomplete. Download the complete patch.