Skip to content

Commit

Permalink
drm/gma500: Remove runtime_allowed dead code in psb_unlocked_ioctl()
Browse files Browse the repository at this point in the history
runtime_allowed is initialized to 0, so the runtime_allowed == 1 condition
is never true making this dead code. Remove it.

Signed-off-by: Hans de Goede <[email protected]>
Acked-by: Patrik Jakobsson <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
jwrdegoede committed Sep 17, 2022
1 parent 9b6a165 commit 49da26d
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions drivers/gpu/drm/gma500/psb_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -433,18 +433,7 @@ static inline void get_brightness(struct backlight_device *bd)
static long psb_unlocked_ioctl(struct file *filp, unsigned int cmd,
unsigned long arg)
{
struct drm_file *file_priv = filp->private_data;
struct drm_device *dev = file_priv->minor->dev;
struct drm_psb_private *dev_priv = to_drm_psb_private(dev);
static unsigned int runtime_allowed;

if (runtime_allowed == 1 && dev_priv->is_lvds_on) {
runtime_allowed++;
pm_runtime_allow(dev->dev);
dev_priv->rpm_enabled = 1;
}
return drm_ioctl(filp, cmd, arg);
/* FIXME: do we need to wrap the other side of this */
}

static int psb_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
Expand Down

0 comments on commit 49da26d

Please sign in to comment.