This commit is contained in:
Tim Deegan committed 2007-03-08 16:41:32 +00:00
commit e1e9aa7c06
3 files changed
+3 -40

No files matched your search

@@ -504,7 +504,6 @@ static struct tpm_vendor_specific tpm_vtpm = {
};
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 *dev,
return ERR_PTR(-ENOMEM);
vtpm_state_init(vtpms);
vtpms->tpmvd = tvd;
vtpms->tpm_private = tp;
chip = tpm_register_hardware(dev, &tpm_vtpm);
@@ -4,16 +4,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;
spinlock_t req_list_lock;
@@ -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,
@@ -369,10 +369,6 @@ static void backend_changed(struct xenbus_device *dev,
}
}
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_device *dev,
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_free_tx_buffers(struct tpm_private *tp)
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 long priv)
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 long priv)
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");
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.