On 10/09/2017 06:56 PM, Marc-André Lureau wrote:
find_tpm() will be introduced to lookup the TPM device.
Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com>
Reviewed-by: Stefan Berger <stef...@linux.vnet.ibm.com>


---
  include/sysemu/tpm_backend.h | 2 +-
  hw/tpm/tpm_tis.c             | 2 +-
  tpm.c                        | 2 +-
  3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/sysemu/tpm_backend.h b/include/sysemu/tpm_backend.h
index 881be97ee3..d02067e631 100644
--- a/include/sysemu/tpm_backend.h
+++ b/include/sysemu/tpm_backend.h
@@ -193,7 +193,7 @@ TPMVersion tpm_backend_get_tpm_version(TPMBackend *s);
   */
  TPMInfo *tpm_backend_query_tpm(TPMBackend *s);

-TPMBackend *qemu_find_tpm(const char *id);
+TPMBackend *qemu_find_tpm_be(const char *id);

  void tpm_register_model(enum TpmModel model);

diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
index e7e8b112e8..954b7b0e5d 100644
--- a/hw/tpm/tpm_tis.c
+++ b/hw/tpm/tpm_tis.c
@@ -1055,7 +1055,7 @@ static void tpm_tis_realizefn(DeviceState *dev, Error 
**errp)
  {
      TPMState *s = TPM(dev);

-    s->be_driver = qemu_find_tpm(s->backend);
+    s->be_driver = qemu_find_tpm_be(s->backend);
      if (!s->be_driver) {
          error_setg(errp, "tpm_tis: backend driver with id %s could not be "
                     "found", s->backend);
diff --git a/tpm.c b/tpm.c
index 37298f3f03..4d6c45a4f2 100644
--- a/tpm.c
+++ b/tpm.c
@@ -71,7 +71,7 @@ static void tpm_display_backend_drivers(void)
  /*
   * Find the TPM with the given Id
   */
-TPMBackend *qemu_find_tpm(const char *id)
+TPMBackend *qemu_find_tpm_be(const char *id)
  {
      TPMBackend *drv;


Reply via email to