@@ -37,7 +37,7 @@ struct class *tpm_class;
3737struct class * tpmrm_class ;
3838dev_t tpm_devt ;
3939
40- static int tpm_request_locality (struct tpm_chip * chip , unsigned int flags )
40+ static int tpm_request_locality (struct tpm_chip * chip )
4141{
4242 int rc ;
4343
@@ -52,7 +52,7 @@ static int tpm_request_locality(struct tpm_chip *chip, unsigned int flags)
5252 return 0 ;
5353}
5454
55- static void tpm_relinquish_locality (struct tpm_chip * chip , unsigned int flags )
55+ static void tpm_relinquish_locality (struct tpm_chip * chip )
5656{
5757 int rc ;
5858
@@ -66,15 +66,15 @@ static void tpm_relinquish_locality(struct tpm_chip *chip, unsigned int flags)
6666 chip -> locality = -1 ;
6767}
6868
69- static int tpm_cmd_ready (struct tpm_chip * chip , unsigned int flags )
69+ static int tpm_cmd_ready (struct tpm_chip * chip )
7070{
7171 if (!chip -> ops -> cmd_ready )
7272 return 0 ;
7373
7474 return chip -> ops -> cmd_ready (chip );
7575}
7676
77- static int tpm_go_idle (struct tpm_chip * chip , unsigned int flags )
77+ static int tpm_go_idle (struct tpm_chip * chip )
7878{
7979 if (!chip -> ops -> go_idle )
8080 return 0 ;
@@ -85,30 +85,29 @@ static int tpm_go_idle(struct tpm_chip *chip, unsigned int flags)
8585/**
8686 * tpm_chip_start() - power on the TPM
8787 * @chip: a TPM chip to use
88- * @flags: TPM transmit flags
8988 *
9089 * Return:
9190 * * The response length - OK
9291 * * -errno - A system error
9392 */
94- int tpm_chip_start (struct tpm_chip * chip , unsigned int flags )
93+ int tpm_chip_start (struct tpm_chip * chip )
9594{
9695 int ret ;
9796
9897 if (chip -> ops -> clk_enable )
9998 chip -> ops -> clk_enable (chip , true);
10099
101100 if (chip -> locality == -1 ) {
102- ret = tpm_request_locality (chip , flags );
101+ ret = tpm_request_locality (chip );
103102 if (ret ) {
104103 chip -> ops -> clk_enable (chip , false);
105104 return ret ;
106105 }
107106 }
108107
109- ret = tpm_cmd_ready (chip , flags );
108+ ret = tpm_cmd_ready (chip );
110109 if (ret ) {
111- tpm_relinquish_locality (chip , flags );
110+ tpm_relinquish_locality (chip );
112111 if (chip -> ops -> clk_enable )
113112 chip -> ops -> clk_enable (chip , false);
114113 return ret ;
@@ -121,16 +120,15 @@ EXPORT_SYMBOL_GPL(tpm_chip_start);
121120/**
122121 * tpm_chip_stop() - power off the TPM
123122 * @chip: a TPM chip to use
124- * @flags: TPM transmit flags
125123 *
126124 * Return:
127125 * * The response length - OK
128126 * * -errno - A system error
129127 */
130- void tpm_chip_stop (struct tpm_chip * chip , unsigned int flags )
128+ void tpm_chip_stop (struct tpm_chip * chip )
131129{
132- tpm_go_idle (chip , flags );
133- tpm_relinquish_locality (chip , flags );
130+ tpm_go_idle (chip );
131+ tpm_relinquish_locality (chip );
134132 if (chip -> ops -> clk_enable )
135133 chip -> ops -> clk_enable (chip , false);
136134}
@@ -158,7 +156,7 @@ int tpm_try_get_ops(struct tpm_chip *chip)
158156 goto out_ops ;
159157
160158 mutex_lock (& chip -> tpm_mutex );
161- rc = tpm_chip_start (chip , 0 );
159+ rc = tpm_chip_start (chip );
162160 if (rc )
163161 goto out_lock ;
164162
@@ -181,7 +179,7 @@ EXPORT_SYMBOL_GPL(tpm_try_get_ops);
181179 */
182180void tpm_put_ops (struct tpm_chip * chip )
183181{
184- tpm_chip_stop (chip , 0 );
182+ tpm_chip_stop (chip );
185183 mutex_unlock (& chip -> tpm_mutex );
186184 up_read (& chip -> ops_sem );
187185 put_device (& chip -> dev );
@@ -297,9 +295,9 @@ static int tpm_class_shutdown(struct device *dev)
297295
298296 if (chip -> flags & TPM_CHIP_FLAG_TPM2 ) {
299297 down_write (& chip -> ops_sem );
300- if (!tpm_chip_start (chip , 0 )) {
298+ if (!tpm_chip_start (chip )) {
301299 tpm2_shutdown (chip , TPM2_SU_CLEAR );
302- tpm_chip_stop (chip , 0 );
300+ tpm_chip_stop (chip );
303301 }
304302 chip -> ops = NULL ;
305303 up_write (& chip -> ops_sem );
@@ -480,9 +478,9 @@ static void tpm_del_char_device(struct tpm_chip *chip)
480478 /* Make the driver uncallable. */
481479 down_write (& chip -> ops_sem );
482480 if (chip -> flags & TPM_CHIP_FLAG_TPM2 ) {
483- if (!tpm_chip_start (chip , 0 )) {
481+ if (!tpm_chip_start (chip )) {
484482 tpm2_shutdown (chip , TPM2_SU_CLEAR );
485- tpm_chip_stop (chip , 0 );
483+ tpm_chip_stop (chip );
486484 }
487485 }
488486 chip -> ops = NULL ;
@@ -566,11 +564,11 @@ int tpm_chip_register(struct tpm_chip *chip)
566564{
567565 int rc ;
568566
569- rc = tpm_chip_start (chip , 0 );
567+ rc = tpm_chip_start (chip );
570568 if (rc )
571569 return rc ;
572570 rc = tpm_auto_startup (chip );
573- tpm_chip_stop (chip , 0 );
571+ tpm_chip_stop (chip );
574572 if (rc )
575573 return rc ;
576574
0 commit comments