| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* toshiba.c -- Linux driver for accessing the SMM on Toshiba laptops |
|---|
| 2 | 3 | * |
|---|
| 3 | 4 | * Copyright (c) 1996-2001 Jonathan A. Buzzard (jonathan@buzzard.org.uk) |
|---|
| .. | .. |
|---|
| 35 | 36 | * *any* time. It is up to any program to be aware of this eventuality |
|---|
| 36 | 37 | * and take appropriate steps. |
|---|
| 37 | 38 | * |
|---|
| 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 | | - * |
|---|
| 48 | 39 | * The information used to write this driver has been obtained by reverse |
|---|
| 49 | 40 | * engineering the software supplied by Toshiba for their portable computers in |
|---|
| 50 | 41 | * strict accordance with the European Council Directive 92/250/EEC on the legal |
|---|
| 51 | 42 | * protection of computer programs, and it's implementation into English Law by |
|---|
| 52 | 43 | * the Copyright (Computer Programs) Regulations 1992 (S.I. 1992 No.3233). |
|---|
| 53 | | - * |
|---|
| 54 | 44 | */ |
|---|
| 55 | 45 | |
|---|
| 56 | 46 | #define TOSH_VERSION "1.11 26/9/2001" |
|---|
| .. | .. |
|---|
| 70 | 60 | #include <linux/seq_file.h> |
|---|
| 71 | 61 | #include <linux/mutex.h> |
|---|
| 72 | 62 | #include <linux/toshiba.h> |
|---|
| 73 | | - |
|---|
| 74 | | -#define TOSH_MINOR_DEV 181 |
|---|
| 75 | 63 | |
|---|
| 76 | 64 | MODULE_LICENSE("GPL"); |
|---|
| 77 | 65 | MODULE_AUTHOR("Jonathan Buzzard <jonathan@buzzard.org.uk>"); |
|---|
| .. | .. |
|---|
| 383 | 371 | value. This has been verified on a Satellite Pro 430CDT, |
|---|
| 384 | 372 | Tecra 750CDT, Tecra 780DVD and Satellite 310CDT. */ |
|---|
| 385 | 373 | #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); |
|---|
| 387 | 375 | #endif |
|---|
| 388 | 376 | bx = 0xe6f5; |
|---|
| 389 | 377 | |
|---|
| .. | .. |
|---|
| 427 | 415 | |
|---|
| 428 | 416 | for (i=0;i<7;i++) { |
|---|
| 429 | 417 | 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"); |
|---|
| 431 | 419 | iounmap(bios); |
|---|
| 432 | 420 | return -ENODEV; |
|---|
| 433 | 421 | } |
|---|
| .. | .. |
|---|
| 443 | 431 | /* if this is not a Toshiba laptop carry flag is set and ah=0x86 */ |
|---|
| 444 | 432 | |
|---|
| 445 | 433 | 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"); |
|---|
| 447 | 435 | iounmap(bios); |
|---|
| 448 | 436 | return -ENODEV; |
|---|
| 449 | 437 | } |
|---|
| .. | .. |
|---|
| 496 | 484 | if (tosh_probe()) |
|---|
| 497 | 485 | return -ENODEV; |
|---|
| 498 | 486 | |
|---|
| 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"); |
|---|
| 500 | 488 | |
|---|
| 501 | 489 | /* set the port to use for Fn status if not specified as a parameter */ |
|---|
| 502 | 490 | if (tosh_fn==0x00) |
|---|