linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] char: tpm: Kconfig: remove bad i2c cr50 select
@ 2021-07-27 17:13 Adrian Ratiu
  2021-07-27 17:13 ` [PATCH v2 2/2] char: tpm: cr50_i2c: convert to new probe interface Adrian Ratiu
  2021-07-28 21:53 ` [PATCH v2 1/2] char: tpm: Kconfig: remove bad i2c cr50 select Jarkko Sakkinen
  0 siblings, 2 replies; 5+ messages in thread
From: Adrian Ratiu @ 2021-07-27 17:13 UTC (permalink / raw)
  To: Jarkko Sakkinen
  Cc: Peter Huewe, Jason Gunthorpe, linux-integrity, linux-kernel,
	kernel, stable

This fixes a minor bug which went unnoticed during the initial
driver upstreaming review: TCG_CR50 does not exist in mainline
kernels, so remove it.

Fixes: 3a253caaad11 ("char: tpm: add i2c driver for cr50")
Cc: stable@vger.kernel.org
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
---
 drivers/char/tpm/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/char/tpm/Kconfig b/drivers/char/tpm/Kconfig
index 4308f9ca7a43..d6ba644f6b00 100644
--- a/drivers/char/tpm/Kconfig
+++ b/drivers/char/tpm/Kconfig
@@ -89,7 +89,6 @@ config TCG_TIS_SYNQUACER
 config TCG_TIS_I2C_CR50
 	tristate "TPM Interface Specification 2.0 Interface (I2C - CR50)"
 	depends on I2C
-	select TCG_CR50
 	help
 	  This is a driver for the Google cr50 I2C TPM interface which is a
 	  custom microcontroller and requires a custom i2c protocol interface
-- 
2.32.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 2/2] char: tpm: cr50_i2c: convert to new probe interface
  2021-07-27 17:13 [PATCH v2 1/2] char: tpm: Kconfig: remove bad i2c cr50 select Adrian Ratiu
@ 2021-07-27 17:13 ` Adrian Ratiu
  2021-07-28 21:53 ` [PATCH v2 1/2] char: tpm: Kconfig: remove bad i2c cr50 select Jarkko Sakkinen
  1 sibling, 0 replies; 5+ messages in thread
From: Adrian Ratiu @ 2021-07-27 17:13 UTC (permalink / raw)
  To: Jarkko Sakkinen
  Cc: Peter Huewe, Jason Gunthorpe, linux-integrity, linux-kernel, kernel

Way back when this driver was written the I2C framework
used to insist an ID table be defined even if the driver
did not use it in favor of ACPI/OF matching, so it was
added just to placate the hard I2C framework requirement.

This is no longer the case so we can drop the table and
also convert the driver to the new probe interface.

Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
---
 drivers/char/tpm/tpm_tis_i2c_cr50.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/drivers/char/tpm/tpm_tis_i2c_cr50.c b/drivers/char/tpm/tpm_tis_i2c_cr50.c
index 44dde2fbe2fb..c89278103703 100644
--- a/drivers/char/tpm/tpm_tis_i2c_cr50.c
+++ b/drivers/char/tpm/tpm_tis_i2c_cr50.c
@@ -639,12 +639,6 @@ static const struct tpm_class_ops cr50_i2c = {
 	.req_canceled = &tpm_cr50_i2c_req_canceled,
 };
 
-static const struct i2c_device_id cr50_i2c_table[] = {
-	{"cr50_i2c", 0},
-	{}
-};
-MODULE_DEVICE_TABLE(i2c, cr50_i2c_table);
-
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id cr50_i2c_acpi_id[] = {
 	{ "GOOG0005", 0 },
@@ -670,8 +664,7 @@ MODULE_DEVICE_TABLE(of, of_cr50_i2c_match);
  * - 0:		Success.
  * - -errno:	A POSIX error code.
  */
-static int tpm_cr50_i2c_probe(struct i2c_client *client,
-			      const struct i2c_device_id *id)
+static int tpm_cr50_i2c_probe(struct i2c_client *client)
 {
 	struct tpm_i2c_cr50_priv_data *priv;
 	struct device *dev = &client->dev;
@@ -774,8 +767,7 @@ static int tpm_cr50_i2c_remove(struct i2c_client *client)
 static SIMPLE_DEV_PM_OPS(cr50_i2c_pm, tpm_pm_suspend, tpm_pm_resume);
 
 static struct i2c_driver cr50_i2c_driver = {
-	.id_table = cr50_i2c_table,
-	.probe = tpm_cr50_i2c_probe,
+	.probe_new = tpm_cr50_i2c_probe,
 	.remove = tpm_cr50_i2c_remove,
 	.driver = {
 		.name = "cr50_i2c",
-- 
2.32.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 1/2] char: tpm: Kconfig: remove bad i2c cr50 select
  2021-07-27 17:13 [PATCH v2 1/2] char: tpm: Kconfig: remove bad i2c cr50 select Adrian Ratiu
  2021-07-27 17:13 ` [PATCH v2 2/2] char: tpm: cr50_i2c: convert to new probe interface Adrian Ratiu
@ 2021-07-28 21:53 ` Jarkko Sakkinen
  2021-07-29 11:10   ` Adrian Ratiu
  1 sibling, 1 reply; 5+ messages in thread
From: Jarkko Sakkinen @ 2021-07-28 21:53 UTC (permalink / raw)
  To: Adrian Ratiu
  Cc: Peter Huewe, Jason Gunthorpe, linux-integrity, linux-kernel,
	kernel, stable

On Tue, Jul 27, 2021 at 08:13:12PM +0300, Adrian Ratiu wrote:
> This fixes a minor bug which went unnoticed during the initial
> driver upstreaming review: TCG_CR50 does not exist in mainline
> kernels, so remove it.
> 
> Fixes: 3a253caaad11 ("char: tpm: add i2c driver for cr50")
> Cc: stable@vger.kernel.org
> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
> Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
> ---

These are missing changelog. I guess tags are added, and nothing else?

/Jarkko

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 1/2] char: tpm: Kconfig: remove bad i2c cr50 select
  2021-07-28 21:53 ` [PATCH v2 1/2] char: tpm: Kconfig: remove bad i2c cr50 select Jarkko Sakkinen
@ 2021-07-29 11:10   ` Adrian Ratiu
  2021-07-30  0:45     ` Jarkko Sakkinen
  0 siblings, 1 reply; 5+ messages in thread
From: Adrian Ratiu @ 2021-07-29 11:10 UTC (permalink / raw)
  To: Jarkko Sakkinen
  Cc: Peter Huewe, Jason Gunthorpe, linux-integrity, linux-kernel,
	kernel, stable

On Thu, 29 Jul 2021, Jarkko Sakkinen <jarkko@kernel.org> wrote:
> On Tue, Jul 27, 2021 at 08:13:12PM +0300, Adrian Ratiu wrote: 
>> This fixes a minor bug which went unnoticed during the initial 
>> driver upstreaming review: TCG_CR50 does not exist in mainline 
>> kernels, so remove it.   Fixes: 3a253caaad11 ("char: tpm: add 
>> i2c driver for cr50") Cc: stable@vger.kernel.org Reviewed-by: 
>> Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Adrian Ratiu 
>> <adrian.ratiu@collabora.com> --- 
> 
> These are missing changelog. I guess tags are added, and nothing 
> else? 

Hi. That is correct, I've only added the tags you suggested on the 
first patch, the second patch is identical.

Adrian

>
> /Jarkko

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 1/2] char: tpm: Kconfig: remove bad i2c cr50 select
  2021-07-29 11:10   ` Adrian Ratiu
@ 2021-07-30  0:45     ` Jarkko Sakkinen
  0 siblings, 0 replies; 5+ messages in thread
From: Jarkko Sakkinen @ 2021-07-30  0:45 UTC (permalink / raw)
  To: Adrian Ratiu
  Cc: Peter Huewe, Jason Gunthorpe, linux-integrity, linux-kernel,
	kernel, stable

On Thu, Jul 29, 2021 at 02:10:16PM +0300, Adrian Ratiu wrote:
> On Thu, 29 Jul 2021, Jarkko Sakkinen <jarkko@kernel.org> wrote:
> > On Tue, Jul 27, 2021 at 08:13:12PM +0300, Adrian Ratiu wrote:
> > > This fixes a minor bug which went unnoticed during the initial
> > > driver upstreaming review: TCG_CR50 does not exist in mainline
> > > kernels, so remove it.   Fixes: 3a253caaad11 ("char: tpm: add i2c
> > > driver for cr50") Cc: stable@vger.kernel.org Reviewed-by: Jarkko
> > > Sakkinen <jarkko@kernel.org> Signed-off-by: Adrian Ratiu
> > > <adrian.ratiu@collabora.com> ---
> > 
> > These are missing changelog. I guess tags are added, and nothing else?
> 
> Hi. That is correct, I've only added the tags you suggested on the first
> patch, the second patch is identical.

OK, cool. I'll pick this up then. Thank you.

/Jarkko

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-07-30  0:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-27 17:13 [PATCH v2 1/2] char: tpm: Kconfig: remove bad i2c cr50 select Adrian Ratiu
2021-07-27 17:13 ` [PATCH v2 2/2] char: tpm: cr50_i2c: convert to new probe interface Adrian Ratiu
2021-07-28 21:53 ` [PATCH v2 1/2] char: tpm: Kconfig: remove bad i2c cr50 select Jarkko Sakkinen
2021-07-29 11:10   ` Adrian Ratiu
2021-07-30  0:45     ` Jarkko Sakkinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).