OMAPFB: simplify locking
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 4 Dec 2012 12:55:18 +0000 (14:55 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 7 Dec 2012 14:55:03 +0000 (16:55 +0200)
commitb41deecbda70067b26a3a7704fdf967a7940935b
tree5d609dc0469c58a29f18cd8e3eb427e427e9cca3
parent636f4e1b45c6204c6912cefa2bdbe22e00784a43
OMAPFB: simplify locking

Kernel lock verification code has lately detected possible circular
locking in omapfb. The exact problem is unclear, but omapfb's current
locking seems to be overly complex.

This patch simplifies the locking in the following ways:

- Remove explicit omapfb mem region locking. I couldn't figure out the
  need for this, as long as we take care to take omapfb lock.

- Get omapfb lock always, even if the operation is possibly only related
  to one fb_info. Better safe than sorry, and normally there's only one
  user for the fb so this shouldn't matter.

- Make sure fb_info lock is taken first, then omapfb lock.

With this patch the warnings about possible circular locking does not
happen anymore.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
drivers/video/omap2/omapfb/omapfb-ioctl.c
drivers/video/omap2/omapfb/omapfb-main.c
drivers/video/omap2/omapfb/omapfb-sysfs.c
drivers/video/omap2/omapfb/omapfb.h
This page took 0.025866 seconds and 5 git commands to generate.