i2c-s3c2410: move resume state flag to end of resume
Subsystems (2)
PATCH 1/1 i2c-s3c2410: move resume state flag to end of resume
From: Kisoo Yu <[email protected]>
need to set flag after finishing its work
--- drivers/i2c/busses/i2c-s3c2410.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/i2c/busses/i2c-s3c2410.c +1 -1
@@ -1082,10 +1082,10 @@ static int s3c24xx_i2c_resume(struct device *dev)struct platform_device *pdev =to_platform_device (dev);struct s3c24xx_i2c *i2c =platform_get_drvdata (pdev); - i2c->suspended =0 ;clk_enable (i2c->clk);s3c24xx_i2c_init (i2c);clk_disable (i2c->clk); + i2c->suspended =0 ;return 0 ; }
Signature · 1 line
1.7.1
drivers/i2c/busses/i2c-s3c2410.c static int s3c24xx_i2c_resume(struct device *dev) · line 1088
Quoted 9 lines · Huisung Kang
From: Kisoo Yu <[email protected]>
need to set flag after finishing its work
drivers/i2c/busses/i2c-s3c2410.c +1
-1- i2c->suspended =0 ;clk_enable (i2c->clk);s3c24xx_i2c_init (i2c);clk_disable (i2c->clk); + i2c->suspended =0 ;
Why is this needed - given that there's no locking involved anywhere here does this mean that we've got a race somewhere?
A message that is not in the archive (sent off-list or not yet received): 20120212131230.GB3395-yzvPICuk2AATkU/[email protected]
Quoted 5 lines · Mark Brown
Quoted 3 lines · Huisung Kang
From: Kisoo Yu <[email protected]>
need to set flag after finishing its work
Quoted 8 lines
drivers/i2c/busses/i2c-s3c2410.c static int s3c24xx_i2c_resume(struct device *dev) · line 1088
Quoted 5 lines
drivers/i2c/busses/i2c-s3c2410.c +1
-1- i2c->suspended =0 ;clk_enable (i2c->clk);s3c24xx_i2c_init (i2c);clk_disable (i2c->clk); + i2c->suspended =0 ;Why is this needed - given that there's no locking involved anywhere here does this mean that we've got a race somewhere?
It is in the wrong order, the lack of locking is a bit of a problem but then again so is the whole suspend/resume framework at the moment. I'm inclined to apply this to the fixes branch.
Signature · 1 line
Ben
Quoted 15 lines · Huisung Kang
From: Kisoo Yu <[email protected]>
need to set flag after finishing its work
Signed-off-by Kisoo Yu <[email protected]>Signed-off-by Huisung Kang <[email protected]>--- drivers/i2c/busses/i2c-s3c2410.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/i2c/busses/i2c-s3c2410.c +0
-0
drivers/i2c/busses/i2c-s3c2410.c static int s3c24xx_i2c_resume(struct device *dev) · line 1088
Quoted 8 lines
drivers/i2c/busses/i2c-s3c2410.c +1
-1@@ -1082,10 +1082,10 @@ static int s3c24xx_i2c_resume(struct device *dev)struct platform_device *pdev =to_platform_device (dev);struct s3c24xx_i2c *i2c =platform_get_drvdata (pdev); - i2c->suspended =0 ;clk_enable (i2c->clk);s3c24xx_i2c_init (i2c);clk_disable (i2c->clk); + i2c->suspended =0 ;
Yes, technically we should not mark ourselves as un-suspended until the peripheral has been properly restarted. I will have a look at Mark's comments before this is applied.
Signature · 1 line
Ben