hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/misc/pti.c
....@@ -1,16 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * pti.c - PTI driver for cJTAG data extration
34 *
45 * Copyright (C) Intel 2010
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 version 2 as
8
- * published by the Free Software Foundation.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
146 *
157 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
168 *
....@@ -504,9 +496,8 @@
504496 * pti_tty_driver_write()- Write trace debugging data through the char
505497 * interface to the PTI HW. Part of the misc device implementation.
506498 *
507
- * @filp: Contains private data which is used to obtain
508
- * master, channel write ID.
509
- * @data: trace data to be written.
499
+ * @tty: tty struct containing pti information.
500
+ * @buf: trace data to be written.
510501 * @len: # of byte to write.
511502 *
512503 * Returns:
....@@ -742,8 +733,8 @@
742733 * pti_port_activate()- Used to start/initialize any items upon
743734 * first opening of tty_port().
744735 *
745
- * @port- The tty port number of the PTI device.
746
- * @tty- The tty struct associated with this device.
736
+ * @port: The tty port number of the PTI device.
737
+ * @tty: The tty struct associated with this device.
747738 *
748739 * Returns:
749740 * always returns 0
....@@ -763,7 +754,7 @@
763754 * pti_port_shutdown()- Used to stop/shutdown any items upon the
764755 * last tty port close.
765756 *
766
- * @port- The tty port number of the PTI device.
757
+ * @port: The tty port number of the PTI device.
767758 *
768759 * Notes: The primary purpose of the PTI tty port 0 is to hook
769760 * the syslog daemon to it; thus this port will be open for a
....@@ -789,8 +780,8 @@
789780 * pti_pci_probe()- Used to detect pti on the pci bus and set
790781 * things up in the driver.
791782 *
792
- * @pdev- pci_dev struct values for pti.
793
- * @ent- pci_device_id struct for pti driver.
783
+ * @pdev: pci_dev struct values for pti.
784
+ * @ent: pci_device_id struct for pti driver.
794785 *
795786 * Returns:
796787 * 0 for success
....@@ -800,7 +791,7 @@
800791 const struct pci_device_id *ent)
801792 {
802793 unsigned int a;
803
- int retval = -EINVAL;
794
+ int retval;
804795 int pci_bar = 1;
805796
806797 dev_dbg(&pdev->dev, "%s %s(%d): PTI PCI ID %04x:%04x\n", __FILE__,
....@@ -842,7 +833,7 @@
842833 }
843834 drv_data->aperture_base = drv_data->pti_addr+APERTURE_14;
844835 drv_data->pti_ioaddr =
845
- ioremap_nocache((u32)drv_data->aperture_base,
836
+ ioremap((u32)drv_data->aperture_base,
846837 APERTURE_LEN);
847838 if (!drv_data->pti_ioaddr) {
848839 retval = -ENOMEM;
....@@ -907,7 +898,6 @@
907898 };
908899
909900 /**
910
- *
911901 * pti_init()- Overall entry/init call to the pti driver.
912902 * It starts the registration process with the kernel.
913903 *
....@@ -918,7 +908,7 @@
918908 */
919909 static int __init pti_init(void)
920910 {
921
- int retval = -EINVAL;
911
+ int retval;
922912
923913 /* First register module as tty device */
924914