]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit2c8d21426026f56ef2fc082e3a61c07a7b584b65
tree5d609dc0469c58a29f18cd8e3eb427e427e9cca3
parent1b5d1f714cdbefdca42b8af1c6dee0048fd74d70
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