mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-06 06:37:59 +00:00
DRM: armada: fix use of kfifo_put()
The kfifo_put() API changed in 498d319bb5
(kfifo API type safety)
which now results in the wrong pointer being added to the kfifo ring,
which then causes an oops. Fix this.
Cc: <stable@vger.kernel.org> # 3.13
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
bed86f15bd
commit
d13c46c67e
1 changed files with 1 additions and 9 deletions
|
@ -68,15 +68,7 @@ void __armada_drm_queue_unref_work(struct drm_device *dev,
|
||||||
{
|
{
|
||||||
struct armada_private *priv = dev->dev_private;
|
struct armada_private *priv = dev->dev_private;
|
||||||
|
|
||||||
/*
|
WARN_ON(!kfifo_put(&priv->fb_unref, fb));
|
||||||
* Yes, we really must jump through these hoops just to store a
|
|
||||||
* _pointer_ to something into the kfifo. This is utterly insane
|
|
||||||
* and idiotic, because it kfifo requires the _data_ pointed to by
|
|
||||||
* the pointer const, not the pointer itself. Not only that, but
|
|
||||||
* you have to pass a pointer _to_ the pointer you want stored.
|
|
||||||
*/
|
|
||||||
const struct drm_framebuffer *silly_api_alert = fb;
|
|
||||||
WARN_ON(!kfifo_put(&priv->fb_unref, &silly_api_alert));
|
|
||||||
schedule_work(&priv->fb_unref_work);
|
schedule_work(&priv->fb_unref_work);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue