Both runtime PM resume and suspend callbacks check whether the driver's
data is set for the device. This is done in probe(); drop the redundant
checks.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Bingbu Cao <bingbu.cao@intel.com>
Tested-by: Mehdi Djait <mehdi.djait@linux.intel.com> # Dell XPS 9315
Reviewed-by: Mehdi Djait <mehdi.djait@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
unsigned long flags;
int ret;
- if (!isys)
- return 0;
-
ret = ipu6_mmu_hw_init(adev->mmu);
if (ret)
return ret;
static int isys_runtime_pm_suspend(struct device *dev)
{
struct ipu6_bus_device *adev = to_ipu6_bus_device(dev);
- struct ipu6_isys *isys;
+ struct ipu6_isys *isys = dev_get_drvdata(dev);
unsigned long flags;
- isys = dev_get_drvdata(dev);
- if (!isys)
- return 0;
-
spin_lock_irqsave(&isys->power_lock, flags);
isys->power = 0;
spin_unlock_irqrestore(&isys->power_lock, flags);