.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * cistpl.c -- 16-bit PCMCIA Card Information Structure parser |
---|
3 | | - * |
---|
4 | | - * This program is free software; you can redistribute it and/or modify |
---|
5 | | - * it under the terms of the GNU General Public License version 2 as |
---|
6 | | - * published by the Free Software Foundation. |
---|
7 | 4 | * |
---|
8 | 5 | * The initial developer of the original code is David A. Hinds |
---|
9 | 6 | * <dahinds@users.sourceforge.net>. Portions created by David A. Hinds |
---|
.. | .. |
---|
24 | 21 | #include <linux/pci.h> |
---|
25 | 22 | #include <linux/ioport.h> |
---|
26 | 23 | #include <linux/io.h> |
---|
| 24 | +#include <linux/security.h> |
---|
27 | 25 | #include <asm/byteorder.h> |
---|
28 | 26 | #include <asm/unaligned.h> |
---|
29 | 27 | |
---|
30 | 28 | #include <pcmcia/ss.h> |
---|
31 | 29 | #include <pcmcia/cisreg.h> |
---|
32 | 30 | #include <pcmcia/cistpl.h> |
---|
| 31 | +#include <pcmcia/ds.h> |
---|
33 | 32 | #include "cs_internal.h" |
---|
34 | 33 | |
---|
35 | 34 | static const u_char mantissa[] = { |
---|
.. | .. |
---|
1578 | 1577 | struct pcmcia_socket *s; |
---|
1579 | 1578 | int error; |
---|
1580 | 1579 | |
---|
| 1580 | + error = security_locked_down(LOCKDOWN_PCMCIA_CIS); |
---|
| 1581 | + if (error) |
---|
| 1582 | + return error; |
---|
| 1583 | + |
---|
1581 | 1584 | s = to_socket(container_of(kobj, struct device, kobj)); |
---|
1582 | 1585 | |
---|
1583 | 1586 | if (off) |
---|