hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/char/toshiba.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /* toshiba.c -- Linux driver for accessing the SMM on Toshiba laptops
23 *
34 * Copyright (c) 1996-2001 Jonathan A. Buzzard (jonathan@buzzard.org.uk)
....@@ -35,22 +36,11 @@
3536 * *any* time. It is up to any program to be aware of this eventuality
3637 * and take appropriate steps.
3738 *
38
- * This program is free software; you can redistribute it and/or modify it
39
- * under the terms of the GNU General Public License as published by the
40
- * Free Software Foundation; either version 2, or (at your option) any
41
- * later version.
42
- *
43
- * This program is distributed in the hope that it will be useful, but
44
- * WITHOUT ANY WARRANTY; without even the implied warranty of
45
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
46
- * General Public License for more details.
47
- *
4839 * The information used to write this driver has been obtained by reverse
4940 * engineering the software supplied by Toshiba for their portable computers in
5041 * strict accordance with the European Council Directive 92/250/EEC on the legal
5142 * protection of computer programs, and it's implementation into English Law by
5243 * the Copyright (Computer Programs) Regulations 1992 (S.I. 1992 No.3233).
53
- *
5444 */
5545
5646 #define TOSH_VERSION "1.11 26/9/2001"
....@@ -70,8 +60,6 @@
7060 #include <linux/seq_file.h>
7161 #include <linux/mutex.h>
7262 #include <linux/toshiba.h>
73
-
74
-#define TOSH_MINOR_DEV 181
7563
7664 MODULE_LICENSE("GPL");
7765 MODULE_AUTHOR("Jonathan Buzzard <jonathan@buzzard.org.uk>");
....@@ -383,7 +371,7 @@
383371 value. This has been verified on a Satellite Pro 430CDT,
384372 Tecra 750CDT, Tecra 780DVD and Satellite 310CDT. */
385373 #if TOSH_DEBUG
386
- printk("toshiba: debugging ID ebx=0x%04x\n", regs.ebx);
374
+ pr_debug("toshiba: debugging ID ebx=0x%04x\n", regs.ebx);
387375 #endif
388376 bx = 0xe6f5;
389377
....@@ -427,7 +415,7 @@
427415
428416 for (i=0;i<7;i++) {
429417 if (readb(bios+0xe010+i)!=signature[i]) {
430
- printk("toshiba: not a supported Toshiba laptop\n");
418
+ pr_err("toshiba: not a supported Toshiba laptop\n");
431419 iounmap(bios);
432420 return -ENODEV;
433421 }
....@@ -443,7 +431,7 @@
443431 /* if this is not a Toshiba laptop carry flag is set and ah=0x86 */
444432
445433 if ((flag==1) || ((regs.eax & 0xff00)==0x8600)) {
446
- printk("toshiba: not a supported Toshiba laptop\n");
434
+ pr_err("toshiba: not a supported Toshiba laptop\n");
447435 iounmap(bios);
448436 return -ENODEV;
449437 }
....@@ -496,7 +484,7 @@
496484 if (tosh_probe())
497485 return -ENODEV;
498486
499
- printk(KERN_INFO "Toshiba System Management Mode driver v" TOSH_VERSION "\n");
487
+ pr_info("Toshiba System Management Mode driver v" TOSH_VERSION "\n");
500488
501489 /* set the port to use for Fn status if not specified as a parameter */
502490 if (tosh_fn==0x00)