staging: mrst: ossync: Avoid double kmalloc()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 22 Dec 2011 15:19:45 +0000 (17:19 +0200)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 3 Jul 2012 09:29:14 +0000 (12:29 +0300)
commit030590f22f6c1f33f7bc37f458dcdd6bda5a0287
treee9f823cd78516981a3c0e67ffd0449dd834f172a
parent9c20196b49be46e13a3e38651c224f2f007d9074
staging: mrst: ossync: Avoid double kmalloc()

Allow the user to embed the pending_sync structure inside its own
structure, and use container_of() in the callback.

This means we can now get by with one kmalloc() per flip, instead
of two.

As PVRSRVCallbackOnSync() can no longer fail, change the return
type to void.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
drivers/staging/mrst/drv/psb_page_flip.c
drivers/staging/mrst/pvr/services4/srvkm/env/linux/ossync.c
drivers/staging/mrst/pvr/services4/srvkm/include/ossync.h