aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2017-11-06 19:39:05 +0100
committerStefan Berger <stefanb@linux.vnet.ibm.com>2017-12-14 23:39:14 -0500
commit3c3ef630621e4cdc5171dcfd19a22b2dc300bcb3 (patch)
tree221fae0a7d83084fd2f8bd86e8617e6de1884aac /backends
parent191adc9476371ad94771609d8b9a968d9332a962 (diff)
downloadqemu-3c3ef630621e4cdc5171dcfd19a22b2dc300bcb3.zip
qemu-3c3ef630621e4cdc5171dcfd19a22b2dc300bcb3.tar.gz
qemu-3c3ef630621e4cdc5171dcfd19a22b2dc300bcb3.tar.bz2
tpm: remove unused opened code
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Diffstat (limited to 'backends')
-rw-r--r--backends/tpm.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/backends/tpm.c b/backends/tpm.c
index 0c48d18..7e636fb 100644
--- a/backends/tpm.c
+++ b/backends/tpm.c
@@ -159,52 +159,10 @@ TPMInfo *tpm_backend_query_tpm(TPMBackend *s)
return info;
}
-static bool tpm_backend_prop_get_opened(Object *obj, Error **errp)
-{
- TPMBackend *s = TPM_BACKEND(obj);
-
- return s->opened;
-}
-
-void tpm_backend_open(TPMBackend *s, Error **errp)
-{
- object_property_set_bool(OBJECT(s), true, "opened", errp);
-}
-
-static void tpm_backend_prop_set_opened(Object *obj, bool value, Error **errp)
-{
- TPMBackend *s = TPM_BACKEND(obj);
- TPMBackendClass *k = TPM_BACKEND_GET_CLASS(s);
- Error *local_err = NULL;
-
- if (value == s->opened) {
- return;
- }
-
- if (!value && s->opened) {
- error_setg(errp, QERR_PERMISSION_DENIED);
- return;
- }
-
- if (k->opened) {
- k->opened(s, &local_err);
- if (local_err) {
- error_propagate(errp, local_err);
- return;
- }
- }
-
- s->opened = true;
-}
-
static void tpm_backend_instance_init(Object *obj)
{
TPMBackend *s = TPM_BACKEND(obj);
- object_property_add_bool(obj, "opened",
- tpm_backend_prop_get_opened,
- tpm_backend_prop_set_opened,
- NULL);
s->bh = qemu_bh_new(tpm_backend_request_completed_bh, s);
}