Commit Graph
3 Commits
Author SHA1 Message Date
Alessandro Rubini 783c2fb1b8 FMC: fix locking in sample chardev driver
The fmc-chardev module was over-locking, by calling misc
register/unregister while holding its spinlock.  This reported a
"scheduling while atomic" error.

Since the misc driver already serializes operations internally, this
commit downgrades the fmc-chardev lock to just cover its own list.

Reported-by: Sasha Levin <[email protected]>
Reported-by: Fengguang Wu <[email protected]>
Signed-off-by: Alessandro Rubini <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-07-24 22:56:52 -07:00
Dan Carpenter 4640a3f2bf FMC: fix error handling in probe() function
The call to kzalloc() wasn't checked.
The dev_info() message dereferenced freed memory on error.

Signed-off-by: Dan Carpenter <[email protected]>
Acked-by: Alessandro Rubini <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-06-24 16:23:25 -07:00
Alessandro Rubini 4debfe409b FMC: add a char-device mezzanine driver
This driver exports the memory area associated with the mezzanine card
as a misc device, so users can access registers.

Signed-off-by: Alessandro Rubini <[email protected]>
Acked-by: Juan David Gonzalez Cobas <[email protected]>
Acked-by: Emilio G. Cota <[email protected]>
Acked-by: Samuel Iglesias Gonsalvez <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-06-18 15:42:15 -07:00