hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/scsi/initio.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /**************************************************************************
23 * Initio 9100 device driver for Linux.
34 *
....@@ -5,21 +6,6 @@
56 * Copyright (c) 1998 Bas Vermeulen <bvermeul@blackstar.xs4all.nl>
67 * Copyright (c) 2004 Christoph Hellwig <hch@lst.de>
78 * Copyright (c) 2007 Red Hat
8
- *
9
- * This program is free software; you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License as published by
11
- * the Free Software Foundation; either version 2, or (at your option)
12
- * any later version.
13
- *
14
- * This program is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- * GNU General Public License for more details.
18
- *
19
- * You should have received a copy of the GNU General Public License
20
- * along with this program; see the file COPYING. If not, write to
21
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
22
- *
239 *
2410 *************************************************************************
2511 *
....@@ -1654,7 +1640,7 @@
16541640 *
16551641 */
16561642
1657
-int initio_state_7(struct initio_host * host)
1643
+static int initio_state_7(struct initio_host * host)
16581644 {
16591645 int cnt, i;
16601646
....@@ -2817,7 +2803,6 @@
28172803 .can_queue = MAX_TARGETS * i91u_MAXQUEUE,
28182804 .this_id = 1,
28192805 .sg_tablesize = SG_ALL,
2820
- .use_clustering = ENABLE_CLUSTERING,
28212806 };
28222807
28232808 static int initio_probe_one(struct pci_dev *pdev,
....@@ -2840,7 +2825,7 @@
28402825 reg = 0;
28412826 bios_seg = (bios_seg << 8) + ((u16) ((reg & 0xFF00) >> 8));
28422827
2843
- if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
2828
+ if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(32))) {
28442829 printk(KERN_WARNING "i91u: Could not set 32 bit DMA mask\n");
28452830 error = -ENODEV;
28462831 goto out_disable_device;
....@@ -2977,20 +2962,8 @@
29772962 .probe = initio_probe_one,
29782963 .remove = initio_remove_one,
29792964 };
2980
-
2981
-static int __init initio_init_driver(void)
2982
-{
2983
- return pci_register_driver(&initio_pci_driver);
2984
-}
2985
-
2986
-static void __exit initio_exit_driver(void)
2987
-{
2988
- pci_unregister_driver(&initio_pci_driver);
2989
-}
2965
+module_pci_driver(initio_pci_driver);
29902966
29912967 MODULE_DESCRIPTION("Initio INI-9X00U/UW SCSI device driver");
29922968 MODULE_AUTHOR("Initio Corporation");
29932969 MODULE_LICENSE("GPL");
2994
-
2995
-module_init(initio_init_driver);
2996
-module_exit(initio_exit_driver);