aboutsummaryrefslogtreecommitdiff
path: root/drivers/misc
AgeCommit message (Collapse)AuthorFilesLines
2013-05-30misc/ep93xx_pwm: use {read,write}* instead of __raw_* versions for ioH Hartley Sweeten1-2/+2
The mmio_base is an ioremap'ed memory resource. The normal memory io functions should be used not the __raw_* versions. Signed-off-by: H Hartley Sweeten <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Reviewed-by: Ryan Mallon <[email protected]> Cc: Matthieu Crapet <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-05-30misc/ep93xx_pwm: use managed device resourcesH Hartley Sweeten1-53/+20
Use managed device resources to clean up the probe/remove. Signed-off-by: H Hartley Sweeten <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Reviewed-by: Ryan Mallon <[email protected]> Cc: Matthieu Crapet <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-05-30drivers/misc: at25: convert to use devm_kzallocNikolay Balandin1-17/+8
Use devm_kzalloc to make cleanup paths simpler Signed-off-by: Nikolay Balandin <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Reviewed-by: Jingoo Han <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-05-30drivers/misc: at24: convert to use devm_kzallocNikolay Balandin1-29/+15
Use devm_kzalloc to make cleanup paths simpler Signed-off-by: Nikolay Balandin <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Reviewed-by: Jingoo Han <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-05-30misc: use platform_{get,set}_drvdata()Jingoo Han4-9/+9
Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev, so we can directly pass a struct platform_device. Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-05-30mei: me: remove artificial singleton requirementTomas Winkler1-19/+0
There is only one device on the platform drop mei_pdev and the mutex Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-05-30mei: fix read after read scenarioTomas Winkler1-11/+13
mei read always has to be preceded by write but 'write write read read' scenario should work as well. In this case the offset is not zero but new read should be initiated Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-05-30mei: deprecate the mei_wd_state_independence_msgTomas Winkler3-37/+0
wd independence is deprecated, remove it. Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-05-28treewide: Fix typo in printkMasanari Iida4-4/+4
Correct spelling typo in various part of drivers Signed-off-by: Masanari Iida <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2013-05-27Merge 3.10-rc3 into char-misc-nextGreg Kroah-Hartman4-3/+9
We want the changes in here. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-05-23Merge tag 'char-misc-3.10-rc2' of ↵Linus Torvalds3-10/+15
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg Kroah-Hartman: "Here are some small char/misc driver fixes for 3.10-rc2. Nothing major here, just a number of fixes for things that people have reported, and a MAINTAINERS update for the recent changes for the hyperv files that went into 3.10-rc1." * tag 'char-misc-3.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: ttyprintk: Fix NULL pointer deref by setting tty_port ops after initializing port uio: UIO_DMEM_GENIRQ should depend on HAS_DMA MAINTAINERS: update Hyper-V file list mei: bus: Reset event_cb when disabling a device Drivers: hv: Fix a bug in get_vp_index() mei: fix out of array access to me clients array Char: lp, protect LPGETSTATUS with port_mutex dummy-irq: require the user to specify an IRQ number
2013-05-22Merge tag 'fixes-for-linus' of ↵Linus Torvalds2-2/+2
git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux Pull virtio fixes from Rusty Russell: "A build fix and a uapi exposure fix. The build fix is later than I liked, but my first version broke linux-next due to overzealous header clean." * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: virtio_console: fix uapi header Hoist memcpy_fromiovec/memcpy_toiovec into lib/
2013-05-21drivers/misc: don't check resource with devm_ioremap_resourceWolfram Sang1-5/+0
devm_ioremap_resource does sanity checks on the given resource. No need to duplicate this in the driver. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-05-21mei: fix out of array access to me clients arrayTomas Winkler1-9/+8
The patch 9f81abdac362: "mei: implement mei_cl_connect function" from Jan 8, 2013, leads to the following static checker warning: "drivers/misc/mei/main.c:522 mei_ioctl_connect_client() warn: check 'dev->me_clients[]' for negative offsets (-2)" Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-05-21mei: bus: Reset event_cb when disabling a deviceSamuel Ortiz1-0/+2
After cancelling all reads from the disable hook, we need to reset the event_cb pointer as well or else we won't be able to set a new one up when re-enabling the device. Acked-by: Tomas Winkler <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-05-21mei: fix out of array access to me clients arrayTomas Winkler1-9/+8
The patch 9f81abdac362: "mei: implement mei_cl_connect function" from Jan 8, 2013, leads to the following static checker warning: "drivers/misc/mei/main.c:522 mei_ioctl_connect_client() warn: check 'dev->me_clients[]' for negative offsets (-2)" Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-05-21mei: revamp interrupt thread handlersTomas Winkler3-81/+68
1. Use common prefix mei_cl_irq_ and common parameter list for client handlers. 2. Update function kdocs Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-05-21mei: move mei_cl_complete to client.cTomas Winkler3-27/+28
1. rename mei_cl_complete_handler to mei_cl_complete 2. move the function client.c where it belongs Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-05-20Hoist memcpy_fromiovec/memcpy_toiovec into lib/Rusty Russell2-2/+2
ERROR: "memcpy_fromiovec" [drivers/vhost/vhost_scsi.ko] undefined! That function is only present with CONFIG_NET. Turns out that crypto/algif_skcipher.c also uses that outside net, but it actually needs sockets anyway. In addition, commit 6d4f0139d642c45411a47879325891ce2a7c164a added CONFIG_NET dependency to CONFIG_VMCI for memcpy_toiovec, so hoist that function and revert that commit too. socket.h already includes uio.h, so no callers need updating; trying only broke things fo x86_64 randconfig (thanks Fengguang!). Reported-by: Randy Dunlap <[email protected]> Acked-by: David S. Miller <[email protected]> Acked-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2013-05-18drivers/misc: don't check resource with devm_ioremap_resourceWolfram Sang1-5/+0
devm_ioremap_resource does sanity checks on the given resource. No need to duplicate this in the driver. Signed-off-by: Wolfram Sang <[email protected]>
2013-05-16misc: ep93xx_pwm: remove unnecessary platform_set_drvdata()Jingoo Han1-1/+0
The driver core clears the driver data to NULL after device_release or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d (device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <[email protected]> Reviewed-by: H Hartley Sweeten <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-05-16misc: arm-charlcd: remove unnecessary platform_set_drvdata()Jingoo Han1-4/+1
The driver core clears the driver data to NULL after device_release or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d (device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-05-16drivers: misc: use devm_ioremap_resource()Laurent Navet1-3/+4
Replace a call to deprecated devm_request_and_ioremap by devm_ioremap_resource. Found with coccicheck and this semantic patch: scripts/coccinelle/api/devm_request_and_ioremap.cocci. Signed-off-by: Laurent Navet <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-05-16Drivers: Misc: tsl2250: fix warnings, unsigned long will never < 0Chen Gang1-2/+2
val is unsigned long which never < 0 Signed-off-by: Chen Gang <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-05-16dummy-irq: require the user to specify an IRQ numberJonathan Corbet1-1/+5
Make sure that we let the user know that without specifying IRQ#, dummy-irq driver is useless. Reported-by: Dave Jones <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]> Signed-off-by: Jiri Kosina <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-05-01Merge branch 'for-linus' of ↵Linus Torvalds2-2/+1
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull VFS updates from Al Viro, Misc cleanups all over the place, mainly wrt /proc interfaces (switch create_proc_entry to proc_create(), get rid of the deprecated create_proc_read_entry() in favor of using proc_create_data() and seq_file etc). 7kloc removed. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (204 commits) don't bother with deferred freeing of fdtables proc: Move non-public stuff from linux/proc_fs.h to fs/proc/internal.h proc: Make the PROC_I() and PDE() macros internal to procfs proc: Supply a function to remove a proc entry by PDE take cgroup_open() and cpuset_open() to fs/proc/base.c ppc: Clean up scanlog ppc: Clean up rtas_flash driver somewhat hostap: proc: Use remove_proc_subtree() drm: proc: Use remove_proc_subtree() drm: proc: Use minor->index to label things, not PDE->name drm: Constify drm_proc_list[] zoran: Don't print proc_dir_entry data in debug reiserfs: Don't access the proc_dir_entry in r_open(), r_start() r_show() proc: Supply an accessor for getting the data from a PDE's parent airo: Use remove_proc_subtree() rtl8192u: Don't need to save device proc dir PDE rtl8187se: Use a dir under /proc/net/r8180/ proc: Add proc_mkdir_data() proc: Move some bits from linux/proc_fs.h to linux/{of.h,signal.h,tty.h} proc: Move PDE_NET() to fs/proc/proc_net.c ...
2013-05-01proc: Supply a function to remove a proc entry by PDEDavid Howells1-1/+1
Supply a function (proc_remove()) to remove a proc entry (and any subtree rooted there) by proc_dir_entry pointer rather than by name and (optionally) root dir entry pointer. This allows us to eliminate all remaining pde->name accesses outside of procfs. Signed-off-by: David Howells <[email protected]> Acked-by: Grant Likely <[email protected]> cc: [email protected] cc: [email protected] cc: [email protected] cc: [email protected] cc: [email protected] cc: [email protected] cc: [email protected] Signed-off-by: Al Viro <[email protected]>
2013-04-30Merge branch 'for-linus' of ↵Linus Torvalds7-25/+28
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull trivial tree updates from Jiri Kosina: "Usual stuff, mostly comment fixes, typo fixes, printk fixes and small code cleanups" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (45 commits) mm: Convert print_symbol to %pSR gfs2: Convert print_symbol to %pSR m32r: Convert print_symbol to %pSR iostats.txt: add easy-to-find description for field 6 x86 cmpxchg.h: fix wrong comment treewide: Fix typo in printk and comments doc: devicetree: Fix various typos docbook: fix 8250 naming in device-drivers pata_pdc2027x: Fix compiler warning treewide: Fix typo in printks mei: Fix comments in drivers/misc/mei treewide: Fix typos in kernel messages pm44xx: Fix comment for "CONFIG_CPU_IDLE" doc: Fix typo "CONFIG_CGROUP_CGROUP_MEMCG_SWAP" mmzone: correct "pags" to "pages" in comment. kernel-parameters: remove outdated 'noresidual' parameter Remove spurious _H suffixes from ifdef comments sound: Remove stray pluses from Kconfig file radio-shark: Fix printk "CONFIG_LED_CLASS" doc: put proper reference to CONFIG_MODULE_SIG_ENFORCE ...
2013-04-30Merge branch 'x86-paravirt-for-linus' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 paravirt update from Ingo Molnar: "Various paravirtualization related changes - the biggest one makes guest support optional via CONFIG_HYPERVISOR_GUEST" * 'x86-paravirt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86, wakeup, sleep: Use pvops functions for changing GDT entries x86, xen, gdt: Remove the pvops variant of store_gdt. x86-32, gdt: Store/load GDT for ACPI S3 or hibernation/resume path is not needed x86-64, gdt: Store/load GDT for ACPI S3 or hibernate/resume path is not needed. x86: Make Linux guest support optional x86, Kconfig: Move PARAVIRT_DEBUG into the paravirt menu
2013-04-29misc: generic on-chip SRAM allocation driverPhilipp Zabel3-0/+131
This driver requests and remaps a memory region as configured in the device tree. It serves memory from this region via the genalloc API. It optionally enables the SRAM clock. Other drivers can retrieve the genalloc pool from a phandle pointing to this drivers' device node in the device tree. The allocation granularity is hard-coded to 32 bytes for now, to make the SRAM driver useful for the 6502 remoteproc driver. There is overhead for bigger SRAMs, where only a much coarser allocation granularity is needed: At 32 bytes minimum allocation size, a 256 KiB SRAM needs a 1 KiB bitmap to track allocations. [[email protected]: fix Kconfig text, make sram_init static] Signed-off-by: Philipp Zabel <[email protected]> Reviewed-by: Shawn Guo <[email protected]> Acked-by: Grant Likely <[email protected]> Tested-by: Michal Simek <[email protected]> Cc: Dong Aisheng <[email protected]> Cc: Fabio Estevam <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Huang Shijie <[email protected]> Cc: Javier Martin <[email protected]> Cc: Matt Porter <[email protected]> Cc: Michal Simek <[email protected]> Cc: Paul Gortmaker <[email protected]> Cc: Rob Herring <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-04-29lis3lv02d: don't wank with fasync() on ->release()Al Viro1-1/+0
Signed-off-by: Al Viro <[email protected]>
2013-04-23misc: mark spear13xx-pcie-gadget as brokenArnd Bergmann1-1/+1
This driver was merged in 2.6.38 but never actually compiled because it depends on the <mach/pcie.h> header that has not made it into the kernel. Starting with Linux-3.10, this results in "allyesconfig" build errors, since spear13xx can now be enabled with the default "multiplatform" platform on ARM. Let's mark it as broken for now. If it doesn't get fixed, we can drop it completely. Cc: Pratyush Anand <[email protected]> Cc: Randy Dunlap <[email protected]> Cc: Jesse Barnes <[email protected]> Cc: Viresh Kumar <[email protected]> Cc: Shiraz Hashim <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-23mei: fix krealloc() misuse in in mei_cl_irq_read_msg()Wei Yongjun1-5/+5
If krealloc() returns NULL, it doesn't free the original. So any code of the form 'foo = krealloc(foo, ...);' is almost certainly a bug. Introduced by commit fcb136e1ac5774909e0d85189f721b8dfa800e0f(mei: fix reading large reposnes) Signed-off-by: Wei Yongjun <[email protected]> Acked-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-23mei: reduce flow control only for completed messagesTomas Winkler1-3/+4
This fixes bug when only first chunk of a large message split by hbuf_max_len is written to the hardware. All the consequent chunks will not get a new credit. A regression introduced by the commit 0ef319c93cebff9f82bdd0cdbb298f2dd00acda8 mei: streamline write complete flow function Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-19mei: reseting -> resettingBill Nottingham4-8/+8
This enum leaks out to userspace via error messages, so fix the spelling. Signed-off-by: Bill Nottingham <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-19mei: fix reading large reposnesTomas Winkler5-15/+27
While writting to device is limitted to max_msg_length advertized in client properites the read can be much longer delivered consequiting chunks. We use krealloc to enlarge the buffer when needed. Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-19mei: revamp mei_irq_read_client_message functionTomas Winkler1-58/+66
1. Rename the function and change parameters order, so that first parameter is mei_device 2. Simplify the function code flow 3. Rename helper functions to more self descriptive names 4. Use helpers common functions where possible Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-19mei: revamp mei_amthif_irq_read_messageTomas Winkler3-6/+15
Rename the function to mei_amthif_irq_read_msg and change parameters order Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-19mei: revamp hbm state machineTomas Winkler7-59/+72
1. Rename init_clients_state to hbm_state and use MEI_HBM_ prefix for HBM states 2. Remove recvd_msg and use hbm state for synchronizing hbm protocol has successful start. We can wake up the hbm event from start response handler and remove the hack from the interrupt thread 3. mei_hbm_start_wait function encapsulate start completion waiting Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-15mei: wd: fix line over 80 charactersTomas Winkler1-1/+2
Fix checkpatch warning: WARNING: line over 80 characters Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-11misc: tsl2550: Use dev_pm_opsLars-Peter Clausen1-10/+11
Use dev_pm_ops instead of the deprecated legacy suspend/resume callbacks. Signed-off-by: Lars-Peter Clausen <[email protected]> Cc: Rodolfo Giometti <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-11misc: isl29003: Use dev_pm_opsLars-Peter Clausen1-8/+11
Use dev_pm_ops instead of the deprecated legacy suspend/resume callbacks. Signed-off-by: Lars-Peter Clausen <[email protected]> Cc: Daniel Mack <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-11misc: fsa8480: Use dev_pm_opsLars-Peter Clausen1-8/+11
Use dev_pm_ops instead of the deprecated legacy suspend/resume callbacks. Signed-off-by: Lars-Peter Clausen <[email protected]> Cc: Donggeun Kim <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-11misc: apds9802als: Fix suspend/resumeLars-Peter Clausen1-21/+4
The apds9802als driver implements runtime pm and at the same time uses the legacy pm callbacks for suspend and resume. This does not work since the i2c core wont look at the legacy pm callbacks if a driver has the 'pm' field set. This patch fixes it by moving over to dev_pm_ops for suspend/resume as well. Since both runtime pm and suspend/resume behave the same way this can easily be done using the UNIVERSAL_DEV_PM_OPS macro. Signed-off-by: Lars-Peter Clausen <[email protected]> Cc: Hong Liu <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-11mei: convert to use simple_open()Wei Yongjun1-8/+2
This removes an open coded simple_open() function and replaces file operations references to the function with simple_open() instead. Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-10mei: nfc: Implement MEI bus opsSamuel Ortiz1-1/+169
The send ops for NFC builds the command header, updates the request id and then waits for an ACK. The recv ops check if it receives data or an ACK and in the latter case wakes the send ops up. The enable ops sends the NFC HECI connect command. Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-10mei: nfc: Add NFC device to the MEI busSamuel Ortiz1-0/+75
After building its bus name as a string based on its vendor id and radio type, we can add it to the bus. Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-10mei: nfc: Initial nfc implementationSamuel Ortiz5-0/+327
NFC ME device is exported through the MEI bus to be consumed by the NFC subsystem. NFC is represented by two mei clients: An info one and the actual NFC one. In order to properly build the ME id we first need to retrieve the firmware information from the info client and then disconnect from it. Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-08mei: bus: Add device enabling and disabling APISamuel Ortiz2-12/+115
It should be left to the drivers to enable and disable the device on the MEI bus when e.g getting probed. For drivers to be able to safely call the enable and disable hooks, the mei_cl_ops must be set before it's probed and thus this should happen before registering the device on the MEI bus. Hence the mei_cl_add_device() prototype change. Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-08mei: notify about the reset in error levelTomas Winkler2-15/+12
Display errors causing device reset using dev_err and not dev_dbg also change messages text to something more concise Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>