tpm: fix call order in tpm-chip.c
authorJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Sun, 1 Mar 2015 21:55:47 +0000 (23:55 +0200)
committerPeter Huewe <peterhuewe@gmx.de>
Fri, 6 Mar 2015 21:35:49 +0000 (22:35 +0100)
- tpm_dev_add_device(): cdev_add() must be done before uevent is
  propagated in order to avoid races.
- tpm_chip_register(): tpm_dev_add_device() must be done as the
  last step before exposing device to the user space in order to
  avoid races.

In addition clarified description in tpm_chip_register().

Fixes: 313d21eeab92 ("tpm: device class for tpm")
Fixes: afb5abc262e9 ("tpm: two-phase chip management functions")

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Reviewed-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>

No differences found