# HG changeset patch
# User Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
# Date 1173372092 0
# Node ID 68c917da8b9b3d378ee7e6b72bd0e5b0656d568f
# Parent 560183e6452a51e3bd8ef0c8065545daf2c23d3b
# Parent 59abe5204ca897e17a9a899029241f467f8b8407
Merge
---
linux-2.6-xen-sparse/drivers/char/tpm/tpm_vtpm.c | 2 -
linux-2.6-xen-sparse/drivers/char/tpm/tpm_vtpm.h | 13 ----------
linux-2.6-xen-sparse/drivers/char/tpm/tpm_xen.c | 28 ++---------------------
3 files changed, 3 insertions(+), 40 deletions(-)
diff -r 560183e6452a -r 68c917da8b9b
linux-2.6-xen-sparse/drivers/char/tpm/tpm_vtpm.c
--- a/linux-2.6-xen-sparse/drivers/char/tpm/tpm_vtpm.c Thu Mar 08 16:40:35
2007 +0000
+++ b/linux-2.6-xen-sparse/drivers/char/tpm/tpm_vtpm.c Thu Mar 08 16:41:32
2007 +0000
@@ -504,7 +504,6 @@ static struct tpm_vendor_specific tpm_vt
};
struct tpm_chip *init_vtpm(struct device *dev,
- struct tpm_virtual_device *tvd,
struct tpm_private *tp)
{
long rc;
@@ -516,7 +515,6 @@ struct tpm_chip *init_vtpm(struct device
return ERR_PTR(-ENOMEM);
vtpm_state_init(vtpms);
- vtpms->tpmvd = tvd;
vtpms->tpm_private = tp;
chip = tpm_register_hardware(dev, &tpm_vtpm);
diff -r 560183e6452a -r 68c917da8b9b
linux-2.6-xen-sparse/drivers/char/tpm/tpm_vtpm.h
--- a/linux-2.6-xen-sparse/drivers/char/tpm/tpm_vtpm.h Thu Mar 08 16:40:35
2007 +0000
+++ b/linux-2.6-xen-sparse/drivers/char/tpm/tpm_vtpm.h Thu Mar 08 16:41:32
2007 +0000
@@ -3,16 +3,6 @@
struct tpm_chip;
struct tpm_private;
-
-struct tpm_virtual_device {
- /*
- * This field indicates the maximum size the driver can
- * transfer in one chunk. It is filled in by the front-end
- * driver and should be propagated to the generic tpm driver
- * for allocation of buffers.
- */
- unsigned int max_tx_size;
-};
struct vtpm_state {
struct transmission *current_request;
@@ -30,8 +20,6 @@ struct vtpm_state {
unsigned long disconnect_time;
- struct tpm_virtual_device *tpmvd;
-
/*
* The following is a private structure of the underlying
* driver. It is passed as parameter in the send function.
@@ -51,7 +39,6 @@ int vtpm_vd_send(struct tpm_private * tp
/* these functions are offered by tpm_vtpm.c */
struct tpm_chip *init_vtpm(struct device *,
- struct tpm_virtual_device *,
struct tpm_private *);
void cleanup_vtpm(struct device *);
int vtpm_vd_recv(const struct tpm_chip* chip,
diff -r 560183e6452a -r 68c917da8b9b
linux-2.6-xen-sparse/drivers/char/tpm/tpm_xen.c
--- a/linux-2.6-xen-sparse/drivers/char/tpm/tpm_xen.c Thu Mar 08 16:40:35
2007 +0000
+++ b/linux-2.6-xen-sparse/drivers/char/tpm/tpm_xen.c Thu Mar 08 16:41:32
2007 +0000
@@ -369,10 +369,6 @@ static void backend_changed(struct xenbu
}
}
-struct tpm_virtual_device tvd = {
- .max_tx_size = PAGE_SIZE * TPMIF_TX_RING_SIZE,
-};
-
static int tpmfront_probe(struct xenbus_device *dev,
const struct xenbus_device_id *id)
{
@@ -383,7 +379,7 @@ static int tpmfront_probe(struct xenbus_
if (!tp)
return -ENOMEM;
- tp->chip = init_vtpm(&dev->dev, &tvd, tp);
+ tp->chip = init_vtpm(&dev->dev, tp);
if (IS_ERR(tp->chip))
return PTR_ERR(tp->chip);
@@ -500,11 +496,6 @@ static void __init init_tpm_xenbus(void)
xenbus_register_frontend(&tpmfront);
}
-static void __exit exit_tpm_xenbus(void)
-{
- xenbus_unregister_driver(&tpmfront);
-}
-
static int tpmif_allocate_tx_buffers(struct tpm_private *tp)
{
unsigned int i;
@@ -530,13 +521,11 @@ static void tpmif_rx_action(unsigned lon
static void tpmif_rx_action(unsigned long priv)
{
struct tpm_private *tp = (struct tpm_private *)priv;
-
int i = 0;
unsigned int received;
unsigned int offset = 0;
u8 *buffer;
- tpmif_tx_request_t *tx;
- tx = &tp->tx->ring[i].req;
+ tpmif_tx_request_t *tx = &tp->tx->ring[i].req;
atomic_set(&tp->tx_busy, 0);
wake_up_interruptible(&tp->wait_q);
@@ -545,7 +534,7 @@ static void tpmif_rx_action(unsigned lon
buffer = kmalloc(received, GFP_ATOMIC);
if (!buffer)
- goto exit;
+ return;
for (i = 0; i < TPMIF_TX_RING_SIZE && offset < received; i++) {
struct tx_buffer *txb = tp->tx_buffers[i];
@@ -566,10 +555,6 @@ static void tpmif_rx_action(unsigned lon
vtpm_vd_recv(tp->chip, buffer, received, tp->tx_remember);
kfree(buffer);
-
-exit:
-
- return;
}
@@ -730,13 +715,6 @@ static int __init tpmif_init(void)
}
-void __exit tpmif_exit(void)
-{
- exit_tpm_xenbus();
- tpm_private_put();
- gnttab_free_grant_references(gref_head);
-}
-
module_init(tpmif_init);
MODULE_LICENSE("Dual BSD/GPL");
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|