summaryrefslogtreecommitdiffstats
path: root/drivers/zorro
Commit message (Collapse)AuthorAgeFilesLines
* Replace <asm/uaccess.h> with <linux/uaccess.h> globallyLinus Torvalds2016-12-241-1/+1
| | | | | | | | | | | | | This was entirely automated, using the script by Al: PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*<asm/uaccess.h>' sed -i -e "s!$PATT!#include <linux/uaccess.h>!" \ $(git grep -l "$PATT"|grep -v ^include/linux/uaccess.h) to do the replacement at the end of the merge window. Requested-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* zorro: Use kobj_to_dev()Geliang Tang2016-01-251-2/+1
| | | | | | | Use kobj_to_dev() instead of open-coding it. Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
* zorro: drop owner assignment from platform_driversWolfram Sang2014-10-201-1/+0
| | | | | | | A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* zorro: Use ARRAY_SIZEHimangi Saraogi2014-07-111-2/+2
| | | | | | | | | | | | | | | | | | | | | ARRAY_SIZE is more concise to use when the size of an array is divided by the size of its type or the size of its first element. The Coccinelle semantic patch that makes this change is as follows: // <smpl> @@ type T; T[] E; @@ - (sizeof(E)/sizeof(T)) + ARRAY_SIZE(E) // </smpl> Signed-off-by: Himangi Saraogi <himangi774@gmail.com> [Geert: Also convert the MANUF definition] Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
* zorro/UAPI: Use proper types (endianness/size) in <linux/zorro.h>Geert Uytterhoeven2013-11-263-10/+26
| | | | | | | | | Fix member definitions for non-native userspace handling: - All multi-byte values are big-endian, hence use __be*, - All pointers are 32-bit pointers under AmigaOS, but unused (except for cd_BoardAddr) under Linux, hence use __be32. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
* zorro: Let the driver core handle device enumerationGeert Uytterhoeven2013-11-262-7/+8
| | | | | | | | | | | | Filling in dev_name of the Zorro bus type and dev.id of each device allows the driver core to enumerate devices, so we don't have to do that ourselves. This changes the names of devices in sysfs from "%02x" to "zorro%u". Note that filling in dev.id is also needed to support MFD Zorro devices. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
* zorro: Refactor conditional handling of Zorro device name databaseGeert Uytterhoeven2013-11-263-11/+7
| | | | | | | Using an empty static inline function in the CONFIG_ZORRO_NAMES=n case allows to drop compilation of names.c. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
* zorro: Don't fill in dummy names in zorro_name_device()Geert Uytterhoeven2013-11-261-1/+0
| | | | | | | | If the device is not found in the database, it's not needed to fill in a dummy name. The caller of zorro_name_device() has already taken care of that to support CONFIG_ZORRO_NAMES=n. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
* zorro: Do not allocate zorro_autocon[] staticallyGeert Uytterhoeven2013-11-261-3/+16
| | | | | | | | | | | | | | Currently the array of Zorro devices is allocated statically, wasting up to 4.5 KiB when running an Amiga or multi-platform kernel on a machine with no or a handful of Zorro expansion cards. Convert it to conditional dynamic memory allocation to fix this. amiga_parse_bootinfo() still needs to store some information about the detected Zorro devices, at a time even the bootmem allocator is not yet available. This is now handled using a much smaller array (typically less than 0.5 KiB), which is __initdata and thus freed later. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
* zorro: switch to fixed_size_llseek()Al Viro2013-06-291-21/+1
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* proc: Supply PDE attribute setting accessor functionsDavid Howells2013-05-011-1/+1
| | | | | | | | | | | | | | | | | Supply accessor functions to set attributes in proc_dir_entry structs. The following are supplied: proc_set_size() and proc_set_user(). Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> cc: linuxppc-dev@lists.ozlabs.org cc: linux-media@vger.kernel.org cc: netdev@vger.kernel.org cc: linux-wireless@vger.kernel.org cc: linux-pci@vger.kernel.org cc: netfilter-devel@vger.kernel.org cc: alsa-devel@alsa-project.org Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* procfs: new helper - PDE_DATA(inode)Al Viro2013-04-091-3/+1
| | | | | | | | | | The only part of proc_dir_entry the code outside of fs/proc really cares about is PDE(inode)->data. Provide a helper for that; static inline for now, eventually will be moved to fs/proc, along with the knowledge of struct proc_dir_entry layout. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* new helper: file_inode(file)Al Viro2013-02-221-2/+2
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* Drivers: zorro: remove CONFIG_HOTPLUG usageGreg Kroah-Hartman2013-01-031-4/+0
| | | | | | | | | CONFIG_HOTPLUG is going away as an option, so remove it from the zorro-driver.c file. Cc: Bill Pemberton <wfp5p@virginia.edu> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* zorro: Remove unused zorro_bus.devicesGeert Uytterhoeven2012-07-151-2/+0
| | | | Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
* misc latin1 to utf8 conversionsAl Viro2012-01-021-1/+1
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* drivers/zorro: Add export.h to proc.cPaul Gortmaker2011-10-311-0/+1
| | | | | | | To fix what used to be the implicit presence of the macros EXPORT_SYMBOL and THIS_MODULE, via module.h being everywhere. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* zorro: Fix four checkpatch warningsJim Rotmalm2011-10-241-4/+4
| | | | | | | | | | | zorro-driver.c: fix four checkpatch warnings of: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable I had a cat. The cat was mine. His name was Zorro. Amiga is fine. Signed-off-by: Jim Rotmalm <jim.rotmalm@gmail.com> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
* zorro: Defer device_register() until all devices have been identifiedGeert Uytterhoeven2011-09-221-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the Amiga Zorro II address space is limited to 8.5 MiB and Zorro devices can contain only one BAR, several Amiga Zorro II expansion boards (mainly graphics cards) contain multiple Zorro devices: a small one for the control registers and one (or more) for the graphics memory. The conversion of cirrusfb to the new driver framework introduced a regression: the driver contains a zorro_driver for the first Zorro device, and uses the (old) zorro_find_device() call to find the second Zorro device. However, as the Zorro core calls device_register() as soon as a Zorro device is identified, it may not have identified the second Zorro device belonging to the same physical Zorro expansion card. Hence cirrusfb could no longer find the second part of the Picasso II graphics card, causing a NULL pointer dereference. Defer the registration of Zorro devices with the driver framework until all Zorro devices have been identified to fix this. Note that the alternative solution (modifying cirrusfb to register a zorro_driver for all Zorro devices belonging to a graphics card, instead of only for the first one, and adding a synchronization mechanism to defer initialization until all have been found), is not an option, as on some cards one device may be optional (e.g. the second bank of 2 MiB of graphics memory on the Picasso IV in Zorro II mode). Reported-by: Ingo Jürgensmann <ij@2011.bluespice.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: stable@kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* BKL: remove extraneous #include <smp_lock.h>Arnd Bergmann2010-11-171-1/+0
| | | | | | | | | | The big kernel lock has been removed from all these files at some point, leaving only the #include. Remove this too as a cleanup. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* zorro: Fix device_register() error handlingVasiliy Kulikov2010-10-221-0/+2
| | | | | | | | If device_register() fails then call put_device(). See comment to device_register. Signed-off-by: Vasiliy Kulikov <segooon@gmail.com> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
* zorro: Fix reading of proc/bus/zorro/* in small chunksGeert Uytterhoeven2010-08-091-1/+1
| | | | | | | proc_bus_zorro_read() didn't take into account the current file position, hence it always read from the start of the ConfigDev. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
* zorro: BKL removalGeert Uytterhoeven2010-08-091-7/+8
| | | | | | | | Remove BKL use from proc_bus_zorro_lseek(), like was done for proc_bus_pci_lseek() a long time ago. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Arnd Bergmann <arnd@arndb.de>
* sysfs: add struct file* to bin_attr callbacksChris Wright2010-05-211-1/+1
| | | | | | | | | This allows bin_attr->read,write,mmap callbacks to check file specific data (such as inode owner) as part of any privilege validation. Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* m68k: amiga - Zorro host bridge platform device conversionGeert Uytterhoeven2010-05-172-118/+131
| | | | Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
* m68k: amiga - Zorro bus modalias supportGeert Uytterhoeven2010-05-172-0/+35
| | | | | | Add Amiga Zorro bus modalias and uevent support Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
* tree-wide: fix typos "ass?o[sc]iac?te" -> "associate" in commentsUwe Kleine-König2010-02-151-1/+1
| | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* m68k: don't export static inline functionsStephen Rothwell2009-12-061-1/+0
| | | | | | | | | | These now cause errors due to changes present in linux-next: (__ksymtab_sorted+0x1258): undefined reference to `dio_dev_driver' (__ksymtab_sorted+0x4d48): undefined reference to `zorro_dev_driver' Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
* zorro: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers2009-03-241-2/+2
| | | | | Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
* m68k: zorro - Use %pR to print resourcesGeert Uytterhoeven2009-01-121-4/+2
| | | | Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
* m68k: zorro - Kill warn_unused_result warningsGeert Uytterhoeven2009-01-123-12/+27
| | | | | | | | | warning: ignoring return value of 'device_register', declared with attribute warn_unused_result warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
* m68k: zorro - Add devlist.h and gen-devlist to .gitignoreKars de Jong2009-01-121-0/+2
| | | | | | | | drivers/zorro/.gitignore: Added devlist.h and gen-devlist to .gitignore file because they shouldn't be tracked. Signed-off-by: Kars de Jong <jongk@linux-m68k.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
* move memory_read_from_buffer() from fs.h to string.hAkinobu Mita2008-07-241-1/+0
| | | | | | | | | | | | | | | | | James Bottomley warns that inclusion of linux/fs.h in a low level driver was always a danger signal. This patch moves memory_read_from_buffer() from fs.h to string.h and fixes includes in existing memory_read_from_buffer() users. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: James Bottomley <James.Bottomley@hansenpartnership.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Bob Moore <robert.moore@intel.com> Cc: Thomas Renninger <trenn@suse.de> Cc: Len Brown <lenb@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* zorro: use memory_read_from_bufferakinobu.mita@gmail.com2008-07-201-8/+2
| | | | | | | | zorro: use memory_read_from_buffer Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ZORRO: Replace deprecated __initcall with equivalent device_initcall.Robert P. J. Day2008-07-201-1/+1
| | | | | | | | ZORRO: Replace deprecated __initcall with equivalent device_initcall. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* m68k: remove CVS keywordsAdrian Bunk2008-07-203-6/+0
| | | | | | | | | This patch removes CVS keywords that weren't updated for a long time from comments. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* zorro: use non-racy method for proc entries creationDenis V. Lunev2008-04-291-3/+4
| | | | | | | | | | | | | | Use proc_create()/proc_create_data() to make sure that ->proc_fops and ->data be setup before gluing PDE to main tree. Add correct ->owner to proc_fops to fix reading/module unloading race. Signed-off-by: Denis V. Lunev <den@openvz.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* proc: switch /proc/bus/zorro/devices to seq_file interfaceAlexey Dobriyan2008-04-291-25/+47
| | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru> Cc: Josef Sipek <jsipek@fsl.cs.sunysb.edu> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* proc: remove proc_busAlexey Dobriyan2008-04-291-1/+1
| | | | | | | | | Remove proc_bus export and variable itself. Using pathnames works fine and is slightly more understandable and greppable. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Amiga zorro bus: Add missing zorro_device_remove()Geert Uytterhoeven2007-11-261-0/+15
| | | | | | | | Amiga zorro bus: Add missing zorro_device_remove(). Without this ifconfig and /proc/net/dev oops after unloading a Zorro network device driver module. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Convert files to UTF-8 and some cleanupsJan Engelhardt2007-10-191-1/+1
| | | | | | | | | | | | | | | | | | * Convert files to UTF-8. * Also correct some people's names (one example is Eißfeldt, which was found in a source file. Given that the author used an ß at all in a source file indicates that the real name has in fact a 'ß' and not an 'ss', which is commonly used as a substitute for 'ß' when limited to 7bit.) * Correct town names (Goettingen -> Göttingen) * Update Eberhard Mönkeberg's address (http://lkml.org/lkml/2007/1/8/313) Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Adrian Bunk <bunk@kernel.org>
* zorro: Make sysfs config attribute read-onlyGeert Uytterhoeven2007-08-221-1/+1
| | | | | | | | | zorro: Make the sysfs `config' attribute read-only, as you cannot write to it (there's no .write function neither). Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* sysfs: add parameter "struct bin_attribute *" in .read/.write methods for ↵Zhang Rui2007-07-111-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sysfs binary attributes Well, first of all, I don't want to change so many files either. What I do: Adding a new parameter "struct bin_attribute *" in the .read/.write methods for the sysfs binary attributes. In fact, only the four lines change in fs/sysfs/bin.c and include/linux/sysfs.h do the real work. But I have to update all the files that use binary attributes to make them compatible with the new .read and .write methods. I'm not sure if I missed any. :( Why I do this: For a sysfs attribute, we can get a pointer pointing to the struct attribute in the .show/.store method, while we can't do this for the binary attributes. I don't know why this is different, but this does make it not so handy to use the binary attributes as the regular ones. So I think this patch is reasonable. :) Who benefits from it: The patch that exposes ACPI tables in sysfs requires such an improvement. All the table binary attributes share the same .read method. Parameter "struct bin_attribute *" is used to get the table signature and instance number which are used to distinguish different ACPI table binary attributes. Without this parameter, we need to offer different .read methods for different ACPI table binary attributes. This is impossible as there are various ACPI tables on different platforms, and we don't know what they are until they are loaded. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* sysfs: kill unnecessary attribute->ownerTejun Heo2007-07-111-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | sysfs is now completely out of driver/module lifetime game. After deletion, a sysfs node doesn't access anything outside sysfs proper, so there's no reason to hold onto the attribute owners. Note that often the wrong modules were accounted for as owners leading to accessing removed modules. This patch kills now unnecessary attribute->owner. Note that with this change, userland holding a sysfs node does not prevent the backing module from being unloaded. For more info regarding lifetime rule cleanup, please read the following message. http://article.gmane.org/gmane.linux.kernel/510293 (tweaked by Greg to not delete the field just yet, to make it easier to merge things properly.) Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Amiga Zorro bus: kill resource_size_t warningsGeert Uytterhoeven2007-05-043-4/+7
| | | | | | | | Kill resource_size_t warnings by casting resource_size_t to unsigned long when formatting Zorro bus resources, as they are always 32-bit. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [PATCH] mark struct file_operations const 6Arjan van de Ven2007-02-121-1/+1
| | | | | | | | | | | Many struct file_operations in the kernel can be "const". Marking them const moves these to the .rodata section, which avoids false sharing with potential dirty data. In addition it'll catch accidental writes at compile time to these shared resources. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [PATCH] struct path: convert zorroJosef Sipek2006-12-081-1/+1
| | | | | | Signed-off-by: Josef Sipek <jsipek@fsl.cs.sunysb.edu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Remove obsolete #include <linux/config.h>Jörn Engel2006-06-301-1/+0
| | | | | Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
* [PATCH] amiga: fix driver_register() return handling, remove zorro_module_init()Bjorn Helgaas2006-03-251-7/+2
| | | | | | | | | | | | | | | | | | | | | Remove the assumption that driver_register() returns the number of devices bound to the driver. In fact, it returns zero for success or a negative error value. zorro_module_init() used the device count to automatically unregister and unload drivers that found no devices. That might have worked at one time, but has been broken for some time because zorro_register_driver() returned either a negative error or a positive count (never zero). So it could only unregister on failure, when it's not needed anyway. This functionality could be resurrected in individual drivers by counting devices in their .probe() methods. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Add zorro_bus_type probe and remove methodsRussell King2006-01-131-2/+2
| | | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>