We should get drvdata from struct device directly.
Going via platform_device is an unneeded step back and forth.
Change-Id: I76cd504d46b1f19a71d14b7a729652166f7f5c6d
Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
{
#ifdef ENABLE_DVFS
struct fimc_is_core *core =
- (struct fimc_is_core *)platform_get_drvdata(to_platform_device(dev));
+ (struct fimc_is_core *)dev_get_drvdata(dev);
struct fimc_is_resourcemgr *resourcemgr;
int i;
char *buf)
{
struct fimc_is_core *core =
- (struct fimc_is_core *)platform_get_drvdata(to_platform_device(dev));
+ (struct fimc_is_core *)dev_get_drvdata(dev);
struct fimc_is_resourcemgr *resourcemgr;
FIMC_BUG(!core);
const char *buf, size_t count)
{
struct fimc_is_core *core =
- (struct fimc_is_core *)platform_get_drvdata(to_platform_device(dev));
+ (struct fimc_is_core *)dev_get_drvdata(dev);
struct fimc_is_resourcemgr *resourcemgr;
FIMC_BUG(!core);
{
int ret = 0;
struct platform_device *pdev = to_platform_device(dev);
- struct fimc_is_core *core = (struct fimc_is_core *)platform_get_drvdata(pdev);
+ struct fimc_is_core *core = (struct fimc_is_core *)dev_get_drvdata(dev);
struct fimc_is_mem *mem = &core->resourcemgr.mem;
struct exynos_platform_fimc_is *pdata;
{
int ret = 0;
struct platform_device *pdev = to_platform_device(dev);
- struct fimc_is_core *core = (struct fimc_is_core *)platform_get_drvdata(pdev);
+ struct fimc_is_core *core = (struct fimc_is_core *)dev_get_drvdata(dev);
struct fimc_is_mem *mem = &core->resourcemgr.mem;
struct exynos_platform_fimc_is *pdata;
FIMC_BUG(!device->interface);
dev = &device->pdev->dev;
- core = (struct fimc_is_core *)platform_get_drvdata(device->pdev);
+ core = (struct fimc_is_core *)dev_get_drvdata(dev);
vender = &core->vender;
itf = device->interface;
FIMC_BUG(!device->interface);
dev = &device->pdev->dev;
- core = (struct fimc_is_core *)platform_get_drvdata(device->pdev);
+ core = (struct fimc_is_core *)dev_get_drvdata(dev);
vender = &core->vender;
if (on) {
int fimc_is_preproc_runtime_suspend(struct device *dev)
{
int ret = 0;
- struct platform_device *pdev = to_platform_device(dev);
struct fimc_is_device_preproc *device;
- device = (struct fimc_is_device_preproc *)platform_get_drvdata(pdev);
+ device = (struct fimc_is_device_preproc *)dev_get_drvdata(dev);
if (!device) {
err("device is NULL");
ret = -EINVAL;
int fimc_is_preproc_runtime_resume(struct device *dev)
{
int ret = 0;
- struct platform_device *pdev = to_platform_device(dev);
struct fimc_is_device_preproc *device;
- device = (struct fimc_is_device_preproc *)platform_get_drvdata(pdev);
+ device = (struct fimc_is_device_preproc *)dev_get_drvdata(dev);
if (!device) {
err("device is NULL");
ret = -EINVAL;
int fimc_is_sensor_runtime_suspend_pre(struct device *dev)
{
int ret = 0;
- struct platform_device *pdev = to_platform_device(dev);
struct fimc_is_device_sensor *device;
- device = (struct fimc_is_device_sensor *)platform_get_drvdata(pdev);
+ device = (struct fimc_is_device_sensor *)dev_get_drvdata(dev);
if (!device) {
err("device is NULL");
goto p_err;
int fimc_is_sensor_runtime_resume_pre(struct device *dev)
{
int ret = 0;
- struct platform_device *pdev = to_platform_device(dev);
struct fimc_is_device_sensor *device;
- device = (struct fimc_is_device_sensor *)platform_get_drvdata(pdev);
+ device = (struct fimc_is_device_sensor *)dev_get_drvdata(dev);
if (!device) {
err("device is NULL");
goto p_err;
int ret = 0;
#ifndef CONFIG_PM
{
- struct platform_device *pdev = to_platform_device(dev);
struct fimc_is_device_ischain *device;
void __iomem *reg_mux_clkphy;
void __iomem *reg_isp_idleness_ch0;
u32 try_count;
unsigned int state;
- device = (struct fimc_is_device_ischain *)platform_get_drvdata(pdev);
+ device = (struct fimc_is_device_ishcain *)dev_get_drvdata(dev);
if (!device) {
err("device is NULL");
goto p_err;
int fimc_is_sensor_runtime_suspend_pre(struct device *dev)
{
int ret = 0;
- struct platform_device *pdev = to_platform_device(dev);
struct fimc_is_device_sensor *device;
- device = (struct fimc_is_device_sensor *)platform_get_drvdata(pdev);
+ device = (struct fimc_is_device_sensor *)dev_get_drvdata(dev);
if (!device) {
err("device is NULL");
goto p_err;
int fimc_is_sensor_runtime_resume_pre(struct device *dev)
{
int ret = 0;
- struct platform_device *pdev = to_platform_device(dev);
struct fimc_is_device_sensor *device;
- device = (struct fimc_is_device_sensor *)platform_get_drvdata(pdev);
+ device = (struct fimc_is_device_sensor *)dev_get_drvdata(dev);
if (!device) {
err("device is NULL");
goto p_err;
p_err:
return ret;
-}
\ No newline at end of file
+}
int fimc_is_sensor_runtime_suspend_pre(struct device *dev)
{
int ret = 0;
- struct platform_device *pdev = to_platform_device(dev);
struct fimc_is_device_sensor *device;
unsigned int state;
- device = (struct fimc_is_device_sensor *)platform_get_drvdata(pdev);
+ device = (struct fimc_is_device_sensor *)dev_get_drvdata(dev);
if (!device) {
err("device is NULL");
goto p_err;
int fimc_is_sensor_runtime_resume_pre(struct device *dev)
{
int ret = 0;
- struct platform_device *pdev = to_platform_device(dev);
struct fimc_is_device_sensor *device;
- device = (struct fimc_is_device_sensor *)platform_get_drvdata(pdev);
+ device = (struct fimc_is_device_sensor *)dev_get_drvdata(dev);
if (!device) {
err("device is NULL");
goto p_err;
int fimc_is_sensor_runtime_suspend_pre(struct device *dev)
{
int ret = 0;
- struct platform_device *pdev = to_platform_device(dev);
struct fimc_is_device_sensor *device;
- device = (struct fimc_is_device_sensor *)platform_get_drvdata(pdev);
+ device = (struct fimc_is_device_sensor *)dev_get_drvdata(dev);
if (!device) {
err("device is NULL");
goto p_err;
int fimc_is_sensor_runtime_resume_pre(struct device *dev)
{
int ret = 0;
- struct platform_device *pdev = to_platform_device(dev);
struct fimc_is_device_sensor *device;
- device = (struct fimc_is_device_sensor *)platform_get_drvdata(pdev);
+ device = (struct fimc_is_device_sensor *)dev_get_drvdata(dev);
if (!device) {
err("device is NULL");
goto p_err;