Changeset 4133
- Timestamp:
- 02/29/08 04:07:59 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/src/target/kernel/2.6.24.x/patches/fix-i2c-s3c2410-resume-race.patch
r4111 r4133 53 53 54 54 case STATE_START: 55 @@ -502,6 +512,1 2@@ static int s3c24xx_i2c_doxfer(struct s3c55 @@ -502,6 +512,14 @@ static int s3c24xx_i2c_doxfer(struct s3c 56 56 unsigned long timeout; 57 57 int ret; 58 58 59 59 + if (i2c->suspended) { 60 + dev_err(i2c->dev, "Hey I am still asleep, retry later\n"); 60 + dev_err(i2c->dev, 61 + "Hey I am still asleep (suspended: %d), retry later\n", 62 + i2c->suspended); 61 63 + ret = -EAGAIN; 62 64 + goto out; … … 66 68 if (ret != 0) { 67 69 dev_err(i2c->dev, "cannot get bus (error %d)\n", ret); 68 @@ -886,6 +90 2,17 @@ static int s3c24xx_i2c_remove(struct pla70 @@ -886,6 +904,17 @@ static int s3c24xx_i2c_remove(struct pla 69 71 } 70 72 … … 84 86 { 85 87 struct s3c24xx_i2c *i2c = platform_get_drvdata(dev); 86 @@ -893,6 +92 0,8 @@ static int s3c24xx_i2c_resume(struct pla88 @@ -893,6 +922,8 @@ static int s3c24xx_i2c_resume(struct pla 87 89 if (i2c != NULL) 88 90 s3c24xx_i2c_init(i2c); … … 93 95 } 94 96 95 @@ -915,6 +944,7 @@ static struct platform_driver s3c2410_i2 97 @@ -905,6 +936,7 @@ static int s3c24xx_i2c_resume(struct pla 98 static struct platform_driver s3c2410_i2c_driver = { 99 .probe = s3c24xx_i2c_probe, 100 .remove = s3c24xx_i2c_remove, 101 + .suspend = s3c24xx_i2c_suspend, 102 .resume = s3c24xx_i2c_resume, 103 .driver = { 104 .owner = THIS_MODULE, 105 @@ -915,6 +947,7 @@ static struct platform_driver s3c2410_i2 96 106 static struct platform_driver s3c2440_i2c_driver = { 97 107 .probe = s3c24xx_i2c_probe,
Note: See TracChangeset
for help on using the changeset viewer.
