hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/scsi/qlogicpti.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /* qlogicpti.c: Performance Technologies QlogicISP sbus card driver.
23 *
34 * Copyright (C) 1996, 2006, 2008 David S. Miller (davem@davemloft.net)
....@@ -29,6 +30,7 @@
2930 #include <linux/of.h>
3031 #include <linux/of_device.h>
3132 #include <linux/firmware.h>
33
+#include <linux/pgtable.h>
3234
3335 #include <asm/byteorder.h>
3436
....@@ -36,7 +38,6 @@
3638
3739 #include <asm/dma.h>
3840 #include <asm/ptrace.h>
39
-#include <asm/pgtable.h>
4041 #include <asm/oplib.h>
4142 #include <asm/io.h>
4243 #include <asm/irq.h>
....@@ -199,10 +200,15 @@
199200 /* Write mailbox command registers. */
200201 switch (mbox_param[param[0]] >> 4) {
201202 case 6: sbus_writew(param[5], qpti->qregs + MBOX5);
203
+ fallthrough;
202204 case 5: sbus_writew(param[4], qpti->qregs + MBOX4);
205
+ fallthrough;
203206 case 4: sbus_writew(param[3], qpti->qregs + MBOX3);
207
+ fallthrough;
204208 case 3: sbus_writew(param[2], qpti->qregs + MBOX2);
209
+ fallthrough;
205210 case 2: sbus_writew(param[1], qpti->qregs + MBOX1);
211
+ fallthrough;
206212 case 1: sbus_writew(param[0], qpti->qregs + MBOX0);
207213 }
208214
....@@ -253,10 +259,15 @@
253259 /* Read back output parameters. */
254260 switch (mbox_param[param[0]] & 0xf) {
255261 case 6: param[5] = sbus_readw(qpti->qregs + MBOX5);
262
+ fallthrough;
256263 case 5: param[4] = sbus_readw(qpti->qregs + MBOX4);
264
+ fallthrough;
257265 case 4: param[3] = sbus_readw(qpti->qregs + MBOX3);
266
+ fallthrough;
258267 case 3: param[2] = sbus_readw(qpti->qregs + MBOX2);
268
+ fallthrough;
259269 case 2: param[1] = sbus_readw(qpti->qregs + MBOX1);
270
+ fallthrough;
260271 case 1: param[0] = sbus_readw(qpti->qregs + MBOX0);
261272 }
262273
....@@ -1287,7 +1298,6 @@
12871298 .can_queue = QLOGICPTI_REQ_QUEUE_LEN,
12881299 .this_id = 7,
12891300 .sg_tablesize = QLOGICPTI_MAX_SG(QLOGICPTI_REQ_QUEUE_LEN),
1290
- .use_clustering = ENABLE_CLUSTERING,
12911301 };
12921302
12931303 static const struct of_device_id qpti_match[];
....@@ -1315,8 +1325,7 @@
13151325 qpti->qhost = host;
13161326 qpti->op = op;
13171327 qpti->qpti_id = nqptis;
1318
- strcpy(qpti->prom_name, op->dev.of_node->name);
1319
- qpti->is_pti = strcmp(qpti->prom_name, "QLGC,isp");
1328
+ qpti->is_pti = !of_node_name_eq(op->dev.of_node, "QLGC,isp");
13201329
13211330 if (qpti_map_regs(qpti) < 0)
13221331 goto fail_unlink;
....@@ -1459,22 +1468,10 @@
14591468 .probe = qpti_sbus_probe,
14601469 .remove = qpti_sbus_remove,
14611470 };
1462
-
1463
-static int __init qpti_init(void)
1464
-{
1465
- return platform_driver_register(&qpti_sbus_driver);
1466
-}
1467
-
1468
-static void __exit qpti_exit(void)
1469
-{
1470
- platform_driver_unregister(&qpti_sbus_driver);
1471
-}
1471
+module_platform_driver(qpti_sbus_driver);
14721472
14731473 MODULE_DESCRIPTION("QlogicISP SBUS driver");
14741474 MODULE_AUTHOR("David S. Miller (davem@davemloft.net)");
14751475 MODULE_LICENSE("GPL");
14761476 MODULE_VERSION("2.1");
14771477 MODULE_FIRMWARE("qlogic/isp1000.bin");
1478
-
1479
-module_init(qpti_init);
1480
-module_exit(qpti_exit);