summaryrefslogtreecommitdiffstats
path: root/drivers/staging/gma500
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.jf.intel.com>2011-05-09 16:04:32 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2011-05-10 11:16:45 -0700
commitea1ce3762b0ed9647d002dad8f3745c2ae534d0a (patch)
tree0fdad4b15a01ea84b01d687f308ccb068fad9839 /drivers/staging/gma500
parentb18aaa1c7cd53ff654d3872ad58ab95343bbe476 (diff)
downloadblackbird-obmc-linux-ea1ce3762b0ed9647d002dad8f3745c2ae534d0a.tar.gz
blackbird-obmc-linux-ea1ce3762b0ed9647d002dad8f3745c2ae534d0a.zip
gma500: sort out the file operations
Route everything via the proper DRM layer calls. This fixes the crash in plymouth and is also necessary to begin supporting libkms. Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/gma500')
-rw-r--r--drivers/staging/gma500/psb_drv.c50
1 files changed, 6 insertions, 44 deletions
diff --git a/drivers/staging/gma500/psb_drv.c b/drivers/staging/gma500/psb_drv.c
index 4d0d1fe5b5e2..46ab028400f4 100644
--- a/drivers/staging/gma500/psb_drv.c
+++ b/drivers/staging/gma500/psb_drv.c
@@ -1313,13 +1313,6 @@ static int psb_register_rw_ioctl(struct drm_device *dev, void *data,
return 0;
}
-/* always available as we are SIGIO'd */
-static unsigned int psb_poll(struct file *filp,
- struct poll_table_struct *wait)
-{
- return POLLIN | POLLRDNORM;
-}
-
static int psb_driver_open(struct drm_device *dev, struct drm_file *priv)
{
return 0;
@@ -1345,29 +1338,9 @@ static long psb_unlocked_ioctl(struct file *filp, unsigned int cmd,
pm_runtime_allow(&dev->pdev->dev);
dev_priv->rpm_enabled = 1;
}
- /*
- * The driver private ioctls should be thread-safe.
- */
-
- if ((nr >= DRM_COMMAND_BASE) && (nr < DRM_COMMAND_END)
- && (nr < DRM_COMMAND_BASE + dev->driver->num_ioctls)) {
- struct drm_ioctl_desc *ioctl =
- &psb_ioctls[nr - DRM_COMMAND_BASE];
-
- if (unlikely(ioctl->cmd != cmd)) {
- DRM_ERROR(
- "Invalid drm cmnd %d ioctl->cmd %x, cmd %x\n",
- nr - DRM_COMMAND_BASE, ioctl->cmd, cmd);
- return -EINVAL;
- }
-
- return drm_ioctl(filp, cmd, arg);
- }
- /*
- * Not all old drm ioctls are thread-safe.
- */
-
return drm_ioctl(filp, cmd, arg);
+
+ /* FIXME: do we need to wrap the other side of this */
}
@@ -1384,17 +1357,6 @@ static void psb_remove(struct pci_dev *pdev)
drm_put_dev(dev);
}
-static int psb_open(struct inode *inode, struct file *filp)
-{
- return 0;
-}
-
-static int psb_release(struct inode *inode, struct file *filp)
-{
- return 0;
-}
-
-
static const struct dev_pm_ops psb_pm_ops = {
.runtime_suspend = psb_runtime_suspend,
.runtime_resume = psb_runtime_resume,
@@ -1438,11 +1400,11 @@ static struct drm_driver driver = {
.fops = {
.owner = THIS_MODULE,
- .open = psb_open,
- .release = psb_release,
+ .open = drm_open,
+ .release = drm_release,
.unlocked_ioctl = psb_unlocked_ioctl,
- /* .mmap = psb_mmap, */
- .poll = psb_poll,
+ .mmap = drm_mmap,
+ .poll = drm_poll,
.fasync = drm_fasync,
.read = drm_read,
},
OpenPOWER on IntegriCloud