aboutsummaryrefslogtreecommitdiff
path: root/fs/char_dev.c
AgeCommit message (Collapse)AuthorFilesLines
2008-04-29fs: remove unused fops from struct char_device_structJiri Olsa1-1/+0
struct char_device_struct::fops is no longer used: remove it. Signed-off-by: Jiri Olsa <[email protected]> Cc: Greg KH <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-02-08fs/char_dev.c: chrdev_open marked static and removed from fs.hDenis Cheng1-1/+1
There is an outdated comment in serial_core.c also fixed. Signed-off-by: Denis Cheng <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-01-24Kobject: rename kobject_init_ng() to kobject_init()Greg Kroah-Hartman1-2/+2
Now that the old kobject_init() function is gone, rename kobject_init_ng() to kobject_init() to clean up the namespace. Cc: Kay Sievers <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2008-01-24Kobject: convert fs/char_dev.c to use kobject_init/add_ng()Greg Kroah-Hartman1-4/+2
This converts the code to use the new kobject functions, cleaning up the logic in doing so. Cc: Kay Sievers <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2007-10-17mm: bdi init hooksPeter Zijlstra1-0/+1
provide BDI constructor/destructor hooks [[email protected]: compile fix] Signed-off-by: Peter Zijlstra <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-07-19unregister_chrdev() return voidAkinobu Mita1-2/+1
unregister_chrdev() does not return meaningful value. This patch makes it return void like most unregister_* functions. Signed-off-by: Akinobu Mita <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-04-04[PATCH] remove protection of LANANA-reserved majorsAndrew Morton1-2/+0
Revert all this. It can cause device-mapper to receive a different major from earlier kernels and it turns out that the Amanda backup program (via GNU tar, apparently) checks major numbers on files when performing incremental backups. Which is a bit broken of Amanda (or tar), but this feature isn't important enough to justify the churn. Cc: Ingo Molnar <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-02-20[PATCH] rework reserved major handlingAndrew Morton1-6/+2
Several people have reported failures in dynamic major device number handling due to the recent changes in there to avoid handing out the local/experimental majors. Rolf reports that this is due to a gcc-4.1.0 bug. The patch refactors that code a lot in an attempt to provoke the compiler into behaving. Cc: Rolf Eike Beer <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-02-12[PATCH] register_chrdev_region() don't hand out the LOCAL/EXPERIMENTAL majorsAndrew Morton1-0/+7
As pointed out in http://bugzilla.kernel.org/show_bug.cgi?id=7922, dynamic chardev major allocation can hand out majors which LANANA has defined as being for local/experimental use. Cc: Torben Mathiasen <[email protected]> Cc: Greg KH <[email protected]> Cc: Al Viro <[email protected]> Cc: Tomas Klas <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-09-30[PATCH] BLOCK: Move extern declarations out of fs/*.c into header files [try #6]David Howells1-0/+1
Create a new header file, fs/internal.h, for common definitions local to the sources in the fs/ directory. Move extern definitions that should be in header files from fs/*.c to fs/internal.h or other main header files where they span directories. Signed-Off-By: David Howells <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2006-09-29[PATCH] cdev documentationJonathan Corbet1-0/+59
Add some documentation comments for the cdev interface. Signed-off-by: Jonathan Corbet <[email protected]> Cc: Rolf Eike Beer <[email protected]> Acked-by: "Randy.Dunlap" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-09-29[PATCH] Chardev checking of overlapping rangesAmos Waterland1-5/+23
The code in __register_chrdev_region checks that if the driver wishing to register has the same major as an existing driver the new minor range is strictly less than the existing minor range. However, it does not also check that the new minor range is strictly greater than the existing minor range. That is, if driver X has registered with major=x and minor=0-3, __register_chrdev_region will allow driver Y to register with major=x and minor=1-4. Signed-off-by: Amos Waterland <[email protected]> Cc: Linas Vepstas <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-09-27[PATCH] NOMMU: Set BDI capabilities for /dev/mem and /dev/kmemDavid Howells1-0/+20
Set the backing device info capabilities for /dev/mem and /dev/kmem to permit direct sharing under no-MMU conditions and full mapping capabilities under MMU conditions. Make the BDI used by these available to all directly mappable character devices. Also comment the capabilities for /dev/zero. [[email protected]: ifdef reductions] Signed-off-by: David Howells <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-07-14[PATCH] add function documentation for register_chrdev()Rolf Eike Beer1-0/+22
Documentation for register_chrdev() was missing completely. [[email protected]: kerneldocification] Signed-off-by: Rolf Eike Beer <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-06-30Remove obsolete #include <linux/config.h>Jörn Engel1-1/+0
Signed-off-by: Jörn Engel <[email protected]> Signed-off-by: Adrian Bunk <[email protected]>
2006-06-26[PATCH] devfs: Remove the devfs_fs_kernel.h file from the treeGreg Kroah-Hartman1-1/+0
Also fixes up all files that #include it. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2006-03-31[PATCH] Simplify proc/devices and fix early termination regressionJoe Korty1-76/+11
Make baby-simple the code for /proc/devices. Based on the proven design for /proc/interrupts. This also fixes the early-termination regression 2.6.16 introduced, as demonstrated by: # dd if=/proc/devices bs=1 Character devices: 1 mem 27+0 records in 27+0 records out This should also work (but is untested) when /proc/devices >4096 bytes, which I believe is what the original 2.6.16 rewrite fixed. [[email protected]: cleanups, simplifications] Signed-off-by: Joe Korty <[email protected]> Cc: Neil Horman <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-03-28[PATCH] Make most file operations structs in fs/ constArjan van de Ven1-1/+1
This is a conversion to make the various file_operations structs in fs/ const. Basically a regexp job, with a few manual fixups The goal is both to increase correctness (harder to accidentally write to shared datastructures) and reducing the false sharing of cachelines with things that get dirty in .data (while .rodata is nicely read only and thus cache clean) Signed-off-by: Arjan van de Ven <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-03-28[PATCH] mark f_ops const in the inodeArjan van de Ven1-2/+2
Mark the f_ops members of inodes as const, as well as fix the ripple-through this causes by places that copy this f_ops and then "do stuff" with it. Signed-off-by: Arjan van de Ven <[email protected]> Signed-off-by: Alexey Dobriyan <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-03-25[PATCH] use kzalloc and kcalloc in core fs codeOliver Neukum1-5/+2
Signed-off-by: Oliver Neukum <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-03-20[PATCH] kobj_map semaphore to mutex conversionJes Sorensen1-8/+9
Convert the kobj_map code to use a mutex instead of a semaphore. It converts the single two users as well, genhd.c and char_dev.c. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2006-01-14[PATCH] convert /proc/devices to use seq_file interfaceNeil Horman1-23/+73
A Christoph suggested that the /proc/devices file be converted to use the seq_file interface. This patch does that. I've obxerved one or two installation that had sufficiently large sans that they overran the 4k limit on /proc/devices. Signed-off-by: Neil Horman <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2005-07-12[PATCH] cdev: cdev_put oopsBrian King1-1/+2
While fixing an oops in the st driver in a dirty release path, I encountered an oops in cdev_put for cdevs allocated using cdev_alloc. If cdev_del is called when the cdev kobject still has an open user, when the last cdev_put is called, the cdev_put will call kobject_put, which will end up ultimately releasing the cdev in cdev_dynamic_release. Patch fixes the oops by preventing cdev_put from accessing freed memory. Signed-off-by: Brian King <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2005-06-28[PATCH] fix semaphore handling in __unregister_chrdev_regionWen-chien Jesse Sung1-1/+1
This up() should be down() instead. Signed-off-by: Wen-chien Jesse Sung <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2005-06-23[PATCH] add check to /proc/devices read routinesNeil Horman1-1/+12
Patch to add check to get_chrdev_list and get_blkdev_list to prevent reads of /proc/devices from spilling over the provided page if more than 4096 bytes of string data are generated from all the registered character and block devices in a system Signed-off-by: Neil Horman <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2005-05-05[PATCH] make some things staticAdrian Bunk1-1/+1
This patch makes some needlessly global identifiers static. Signed-off-by: Adrian Bunk <[email protected]> Acked-by: Arjan van de Ven <[email protected]> Acked-by: Trond Myklebust <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2005-04-17[PATCH] revert fs/char_dev.c CONFIG_BASE_FULL changeDavid Brownell1-2/+1
This reverts a fs/char_dev.c patch that was merged into BK on March 3. The problem is that it breaks things ... __register_chrdev_region() has a block of code, commented "temporary" for over two years now, which fails rudely during PCMCIA initialization or other register_chrdev() calls, because it doesn't "degrade to linked list". This keeps whole subsystems from working. A real fix to that "temporary" code should be possible, using some better scheme to allocate major numbers, but it's not something I want to spend time on just now. Signed-off-by: David Brownell <[email protected]> Acked-by: Matt Mackall <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2005-04-16Linux-2.6.12-rc2Linus Torvalds1-0/+449
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!