Am Donnerstag, 6. Dezember 2012, 00:09:41 schrieb Kent Yoder:
> > 
> > > static int tpm_st33_i2c_pm_suspend(struct i2c_client *client,
> > > pm_message_t mesg)
> > >
> > >...
> > >
> > > static int tpm_st33_i2c_pm_resume(struct i2c_client *client)
> > >
> > >,,,
> > >static struct i2c_driver tpm_st33_i2c_driver = {
> > >
> > >   .driver = {
> > >   
> > >              .owner = THIS_MODULE,
> > >              .name = TPM_ST33_I2C,
> > >              },
> > >   
> > >   .probe = tpm_st33_i2c_probe,
> > >   .remove = tpm_st33_i2c_remove,
> > >   .resume = tpm_st33_i2c_pm_resume,
> > >   .suspend = tpm_st33_i2c_pm_suspend,
> > >   .id_table = tpm_st33_i2c_id
> > >
> > >};
> > 
> > Please convert resume/suspend  to .driver.pm
> > 
> > It's pretty easy.
> > See this post  for details
> > http://sourceforge.net/mailarchive/message.php?msg_id=29516784
> > Rafael did spent quite a lot of effort to convert almost every driver
> > back then, so we should 'fix' new ones.
> 
> Not sure how easy this will be considering these routines are
> i2c-specific -- they don't just call the tpm_tpm_* functions like the
> other drivers.

Why are they really i2c-specific?
The only i2c specific part is the i2c_get_clientdata - which calls 
get_dev_drvdata internally.
And I since we already get the correct struct device we don't need to use 
TPM_VPRIV in order to access the platform data. 

I'll send a patch - see next email.
@Matthias: can you please test this? As I cannot do this.


Thanks,
Peter


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to