diff options
Diffstat (limited to 'drivers/i2c/chips/pcf50633.c')
-rw-r--r-- | drivers/i2c/chips/pcf50633.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/i2c/chips/pcf50633.c b/drivers/i2c/chips/pcf50633.c index 2c739b41fe1..2dbeecbe700 100644 --- a/drivers/i2c/chips/pcf50633.c +++ b/drivers/i2c/chips/pcf50633.c @@ -2152,8 +2152,6 @@ static int pcf50633_detect(struct i2c_adapter *adapter, int address, int kind) goto exit_free; } - pcf50633_global = pcf; - init_resume_dependency_list(&pcf->resume_dependency); populate_sysfs_group(pcf); @@ -2229,11 +2227,13 @@ static int pcf50633_detect(struct i2c_adapter *adapter, int address, int kind) backlight_update_status(pcf->backlight); } - pcf->probe_completed = 1; - if (pcf->pdata->flag_use_apm_emulation) apm_get_power_status = pcf50633_get_power_status; + pcf->probe_completed = 1; + pcf50633_global = pcf; + dev_info(&new_client->dev, "probe completed\n"); + /* if platform was interested, give him a chance to register * platform devices that switch power with us as the parent * at registration time -- ensures suspend / resume ordering @@ -2473,6 +2473,10 @@ int pcf50633_ready(struct pcf50633_data *pcf) if (!pcf) return -EACCES; + /* this was seen during boot with Qi, mmc_rescan racing us */ + if (!pcf->probe_completed) + return -EACCES; + if ((pcf->suspend_state != PCF50633_SS_RUNNING) && (pcf->suspend_state < PCF50633_SS_COMPLETED_RESUME)) return -EBUSY; |