All of lore.kernel.org
 help / color / mirror / Atom feed
* [BK PATCH] Driver core and kobject updates for 2.6.11
@ 2005-03-10  0:34 Greg KH
  2005-03-10  0:34 ` [PATCH] Kobject: remove some unneeded exports Greg KH
  0 siblings, 1 reply; 35+ messages in thread
From: Greg KH @ 2005-03-10  0:34 UTC (permalink / raw)
  To: torvalds, akpm; +Cc: linux-kernel

Hi,

Here are some driver core and kobject/kref updates for 2.6.11.  They
have all been in the -mm releases for some time now.  There is also a
documentation update for the schedule removal feature list.

Please pull from:  bk://kernel.bkbits.net/gregkh/linux/2.6.11/driver

Individual patches will follow, sent to the linux-kernel list.

thanks,

greg k-h

 Documentation/feature-removal-schedule.txt |   23 +++++-
 drivers/base/bus.c                         |    4 -
 drivers/base/class.c                       |   98 +++++++++++++----------------
 drivers/base/class_simple.c                |   21 ------
 drivers/base/driver.c                      |   13 +--
 drivers/base/map.c                         |   21 ++----
 drivers/base/platform.c                    |    2 
 drivers/base/sys.c                         |   39 +++++------
 drivers/block/floppy.c                     |   19 +----
 drivers/block/genhd.c                      |   55 ++++++++++------
 drivers/i2c/i2c-dev.c                      |    9 --
 drivers/media/video/videodev.c             |   11 ---
 drivers/usb/core/file.c                    |   64 +++++-------------
 fs/char_dev.c                              |   26 ++-----
 include/linux/device.h                     |    5 -
 include/linux/kobj_map.h                   |    2 
 include/linux/kobject.h                    |    2 
 include/linux/kref.h                       |    2 
 lib/kobject.c                              |   15 ++--
 lib/kref.c                                 |   11 ++-
 20 files changed, 202 insertions(+), 240 deletions(-)
-----


Arjan van de Ven:
  o Kobject: remove some unneeded exports

Dominik Brodowski:
  o cpufreq 2.4 interface removal schedule

Greg Kroah-Hartman:
  o class: add a semaphore to struct class, and use that instead of the subsystem rwsem
  o sysdev: remove the rwsem usage from this subsystem
  o sysdev: fix the name of the list of drivers to be a sane name
  o kmap: remove usage of rwsem from kobj_map
  o USB: move usb core to use class_simple instead of it's own class functions
  o kref: make kref_put return if this was the last put call
  o sysdev: make system_subsys static as no one else needs access to it
  o kset: make ksets have a spinlock, and use that to lock their lists

Kay Sievers:
  o floppy.c: pass physical device to device registration
  o Driver core: add "bus" symlink to class/block devices
  o videodev: pass dev_t to the class core
  o i2c: class driver pass dev_t to the class core
  o usb: class driver pass dev_t to the class core
  o class_simple: pass dev_t to the class core
  o block core: export MAJOR/MINOR to the hotplug env
  o class core: export MAJOR/MINOR to the hotplug env

Mike Waychison:
  o driver core: clean driver unload

Randy Dunlap:
  o Add 2.4.x cpufreq /proc and sysctl interface removal feature-removal-schedule

Russell King:
  o driver core: Separate platform device name from platform device number


^ permalink raw reply	[flat|nested] 35+ messages in thread
* [PATCH] floppy.c: pass physical device to device registration
@ 2005-01-16 19:55 Kay Sievers
  0 siblings, 0 replies; 35+ messages in thread
From: Kay Sievers @ 2005-01-16 19:55 UTC (permalink / raw)
  To: linux-kernel

With this patch the floppy driver creates the usual symlink in sysfs to
the physical device backing the block device:

  $tree /sys/block/
  /sys/block/
  |-- fd0
  |   |-- dev
  |   |-- device -> ../../devices/platform/floppy0
  ...

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>

===== drivers/block/floppy.c 1.111 vs edited =====
--- 1.111/drivers/block/floppy.c	2005-01-08 06:44:29 +01:00
+++ edited/drivers/block/floppy.c	2005-01-16 20:24:56 +01:00
@@ -4370,6 +4370,10 @@ int __init floppy_init(void)
 		goto out_flush_work;
 	}
 
+	err = platform_device_register(&floppy_device);
+	if (err)
+		goto out_flush_work;
+
 	for (drive = 0; drive < N_DRIVE; drive++) {
 		if (!(allowed_drive_mask & (1 << drive)))
 			continue;
@@ -4379,23 +4383,12 @@ int __init floppy_init(void)
 		disks[drive]->private_data = (void *)(long)drive;
 		disks[drive]->queue = floppy_queue;
 		disks[drive]->flags |= GENHD_FL_REMOVABLE;
+		disks[drive]->driverfs_dev = &floppy_device.dev;
 		add_disk(disks[drive]);
 	}
 
-	err = platform_device_register(&floppy_device);
-	if (err)
-		goto out_del_disk;
-
 	return 0;
 
-out_del_disk:
-	for (drive = 0; drive < N_DRIVE; drive++) {
-		if (!(allowed_drive_mask & (1 << drive)))
-			continue;
-		if (fdc_state[FDC(drive)].version == FDC_NONE)
-			continue;
-		del_gendisk(disks[drive]);
-	}
 out_flush_work:
 	flush_scheduled_work();
 	if (usage_count)
@@ -4600,7 +4593,6 @@ void cleanup_module(void)
 	int drive;
 
 	init_completion(&device_release);
-	platform_device_unregister(&floppy_device);
 	blk_unregister_region(MKDEV(FLOPPY_MAJOR, 0), 256);
 	unregister_blkdev(FLOPPY_MAJOR, "fd");
 
@@ -4614,6 +4606,7 @@ void cleanup_module(void)
 		}
 		put_disk(disks[drive]);
 	}
+	platform_device_unregister(&floppy_device);
 	devfs_remove("floppy");
 
 	del_timer_sync(&fd_timeout);


^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2005-03-25 22:16 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-10  0:34 [BK PATCH] Driver core and kobject updates for 2.6.11 Greg KH
2005-03-10  0:34 ` [PATCH] Kobject: remove some unneeded exports Greg KH
2005-03-10  0:34   ` [PATCH] Add 2.4.x cpufreq /proc and sysctl interface removal feature-removal-schedule Greg KH
2005-03-10  0:34     ` [PATCH] cpufreq 2.4 interface removal schedule Greg KH
2005-03-10  0:34       ` [PATCH] driver core: Separate platform device name from platform device number Greg KH
2005-03-10  0:34         ` [PATCH] class core: export MAJOR/MINOR to the hotplug env Greg KH
2005-03-10  0:34           ` [PATCH] block " Greg KH
2005-03-10  0:34             ` [PATCH] class_simple: pass dev_t to the class core Greg KH
2005-03-10  0:34               ` [PATCH] usb: class driver " Greg KH
2005-03-10  0:34                 ` [PATCH] i2c: " Greg KH
2005-03-10  0:34                   ` [PATCH] videodev: " Greg KH
2005-03-10  0:34                     ` [PATCH] driver core: clean driver unload Greg KH
2005-03-10  0:34                       ` [PATCH] Driver core: add "bus" symlink to class/block devices Greg KH
2005-03-10  0:34                         ` [PATCH] floppy.c: pass physical device to device registration Greg KH
2005-03-10  0:34                           ` [PATCH] kset: make ksets have a spinlock, and use that to lock their lists Greg KH
2005-03-10  0:34                             ` [PATCH] sysdev: make system_subsys static as no one else needs access to it Greg KH
2005-03-10  0:34                               ` [PATCH] kref: make kref_put return if this was the last put call Greg KH
2005-03-10  0:34                                 ` [PATCH] USB: move usb core to use class_simple instead of it's own class functions Greg KH
2005-03-10  0:34                                   ` [PATCH] kmap: remove usage of rwsem from kobj_map Greg KH
2005-03-10  0:34                                     ` [PATCH] sysdev: fix the name of the list of drivers to be a sane name Greg KH
2005-03-10  0:34                                       ` [PATCH] sysdev: remove the rwsem usage from this subsystem Greg KH
2005-03-10  0:34                                         ` [PATCH] class: add a semaphore to struct class, and use that instead of the subsystem rwsem Greg KH
2005-03-25 18:01         ` [PATCH] driver core: Separate platform device name from platform device number Paul Mundt
2005-03-25 18:10           ` Greg KH
2005-03-25 18:35             ` Paul Mundt
2005-03-25 19:38               ` Kyle Moffett
2005-03-25 19:58                 ` Paul Mundt
2005-03-25 20:17                   ` Kyle Moffett
2005-03-25 20:25                   ` Russell King
2005-03-25 20:56                     ` Paul Mundt
2005-03-25 21:03                       ` Russell King
2005-03-25 22:15                         ` Paul Mundt
2005-03-10  2:23     ` [PATCH] Add 2.4.x cpufreq /proc and sysctl interface removal feature-removal-schedule Dave Jones
2005-03-10  4:56     ` Dominik Brodowski
  -- strict thread matches above, loose matches on Subject: below --
2005-01-16 19:55 [PATCH] floppy.c: pass physical device to device registration Kay Sievers

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.