hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/drivers/pnp/isapnp/core.c
....@@ -1,21 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * ISA Plug & Play support
34 * Copyright (c) by Jaroslav Kysela <perex@perex.cz>
4
- *
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License as published by
8
- * the Free Software Foundation; either version 2 of the License, or
9
- * (at your option) any later version.
10
- *
11
- * This program is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- * GNU General Public License for more details.
15
- *
16
- * You should have received a copy of the GNU General Public License
17
- * along with this program; if not, write to the Free Software
18
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
195 *
206 * Changelog:
217 * 2000-01-01 Added quirks handling for buggy hardware
....@@ -761,34 +747,12 @@
761747 }
762748
763749 /*
764
- * Compute ISA PnP checksum for first eight bytes.
765
- */
766
-static unsigned char __init isapnp_checksum(unsigned char *data)
767
-{
768
- int i, j;
769
- unsigned char checksum = 0x6a, bit, b;
770
-
771
- for (i = 0; i < 8; i++) {
772
- b = data[i];
773
- for (j = 0; j < 8; j++) {
774
- bit = 0;
775
- if (b & (1 << j))
776
- bit = 1;
777
- checksum =
778
- ((((checksum ^ (checksum >> 1)) & 0x01) ^ bit) << 7)
779
- | (checksum >> 1);
780
- }
781
- }
782
- return checksum;
783
-}
784
-
785
-/*
786750 * Build device list for all present ISA PnP devices.
787751 */
788752 static int __init isapnp_build_device_list(void)
789753 {
790754 int csn;
791
- unsigned char header[9], checksum;
755
+ unsigned char header[9];
792756 struct pnp_card *card;
793757 u32 eisa_id;
794758 char id[8];
....@@ -798,7 +762,6 @@
798762 for (csn = 1; csn <= isapnp_csn_count; csn++) {
799763 isapnp_wake(csn);
800764 isapnp_peek(header, 9);
801
- checksum = isapnp_checksum(header);
802765 eisa_id = header[0] | header[1] << 8 |
803766 header[2] << 16 | header[3] << 24;
804767 pnp_eisa_id_to_string(eisa_id, id);