hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/drivers/mmc/core/sdio_cis.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * linux/drivers/mmc/core/sdio_cis.c
34 *
....@@ -6,11 +7,6 @@
67 * Copyright: MontaVista Software Inc.
78 *
89 * Copyright 2007 Pierre Ossman
9
- *
10
- * This program is free software; you can redistribute it and/or modify
11
- * it under the terms of the GNU General Public License as published by
12
- * the Free Software Foundation; either version 2 of the License, or (at
13
- * your option) any later version.
1410 */
1511
1612 #include <linux/kernel.h>
....@@ -29,11 +25,15 @@
2925 static int cistpl_vers_1(struct mmc_card *card, struct sdio_func *func,
3026 const unsigned char *buf, unsigned size)
3127 {
28
+ u8 major_rev, minor_rev;
3229 unsigned i, nr_strings;
3330 char **buffer, *string;
3431
3532 if (size < 2)
3633 return 0;
34
+
35
+ major_rev = buf[0];
36
+ minor_rev = buf[1];
3737
3838 /* Find all null-terminated (including zero length) strings in
3939 the TPLLV1_INFO field. Trailing garbage is ignored. */
....@@ -66,9 +66,13 @@
6666 }
6767
6868 if (func) {
69
+ func->major_rev = major_rev;
70
+ func->minor_rev = minor_rev;
6971 func->num_info = nr_strings;
7072 func->info = (const char**)buffer;
7173 } else {
74
+ card->major_rev = major_rev;
75
+ card->minor_rev = minor_rev;
7276 card->num_info = nr_strings;
7377 card->info = (const char**)buffer;
7478 }