X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=drivers%2Fchar%2Ftpm%2Ftpm.c;h=36f91a655275a6f7481648b8b6273d2537b40e96;hb=c4028958b6ecad064b1a6303a6a5906d4fe48d73;hp=6ad2d3bb945c06fc2dc86d92eaa8d2fa410c0308;hpb=65f27f38446e1976cc98fd3004b110fedcddd189;p=deliverable%2Flinux.git diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c index 6ad2d3bb945c..36f91a655275 100644 --- a/drivers/char/tpm/tpm.c +++ b/drivers/char/tpm/tpm.c @@ -325,9 +325,9 @@ static void user_reader_timeout(unsigned long ptr) schedule_work(&chip->work); } -static void timeout_work(void *ptr) +static void timeout_work(struct work_struct *work) { - struct tpm_chip *chip = ptr; + struct tpm_chip *chip = container_of(work, struct tpm_chip, work); down(&chip->buffer_mutex); atomic_set(&chip->data_pending, 0); @@ -1105,7 +1105,7 @@ struct tpm_chip *tpm_register_hardware(struct device *dev, const struct tpm_vend init_MUTEX(&chip->tpm_mutex); INIT_LIST_HEAD(&chip->list); - INIT_WORK(&chip->work, timeout_work, chip); + INIT_WORK(&chip->work, timeout_work); init_timer(&chip->user_read_timer); chip->user_read_timer.function = user_reader_timeout;