Re: [PATCH v4] tpm: fix reference counting for struct tpm_chip
From: Lino Sanfilippo
Date: Tue Feb 16 2021 - 14:17:44 EST
Hi
On 16.02.21 at 17:04, Jarkko Sakkinen wrote:
>>> + /*
>>> + * get extra reference on main device to hold on behalf of devs.
>>> + * This holds the chip structure while cdevs is in use. The
>>> + * corresponding put is in the tpm_devs_release.
>>> + */
>>> + get_device(&chip->dev);
>>> + chip->devs.release = tpm_devs_release;
>>> + chip->devs.devt =
>>> + MKDEV(MAJOR(tpm_devt), chip->dev_num + TPM_NUM_DEVICES);
>
> Isn't this less than 100 chars?
>
I just chose the same formatting that the original code used. Personally I prefer what
David suggested, so if there is no objection against it I will format it this way.
Regards,
Lino