Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tpm: Remove a deprecated comments about implicit sysfs locking

Remove all comments about implicit locking tpm-sysfs.c as the file was
updated in Linux v5.1 to use explicit locking.

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>

+2 -12
+2 -5
drivers/char/tpm/tpm-chip.c
··· 287 287 * @dev: device to which the chip is associated. 288 288 * 289 289 * Issues a TPM2_Shutdown command prior to loss of power, as required by the 290 - * TPM 2.0 spec. 291 - * Then, calls bus- and device- specific shutdown code. 290 + * TPM 2.0 spec. Then, calls bus- and device- specific shutdown code. 292 291 * 293 - * XXX: This codepath relies on the fact that sysfs is not enabled for 294 - * TPM2: sysfs uses an implicit lock on chip->ops, so this could race if TPM2 295 - * has sysfs support enabled before TPM sysfs's implicit locking is fixed. 292 + * Return: always 0 (i.e. success) 296 293 */ 297 294 static int tpm_class_shutdown(struct device *dev) 298 295 {
-7
drivers/char/tpm/tpm-sysfs.c
··· 329 329 330 330 void tpm_sysfs_add_device(struct tpm_chip *chip) 331 331 { 332 - /* XXX: If you wish to remove this restriction, you must first update 333 - * tpm_sysfs to explicitly lock chip->ops. 334 - */ 335 332 if (chip->flags & TPM_CHIP_FLAG_TPM2) 336 333 return; 337 334 338 - /* The sysfs routines rely on an implicit tpm_try_get_ops, device_del 339 - * is called before ops is null'd and the sysfs core synchronizes this 340 - * removal so that no callbacks are running or can run again 341 - */ 342 335 WARN_ON(chip->groups_cnt != 0); 343 336 chip->groups[chip->groups_cnt++] = &tpm_dev_group; 344 337 }