On Sun, Jan 8, 2017 at 1:57 AM, Sudip Mukherjee
<sudipm.mukherjee@xxxxxxxxx> wrote:
Add the serial driver for the exar chips. And also register the
platform device for the exar gpio.
Did you ignore some comments?
IIRC I recommended to use proper vendor name like Exar (or how is it spelled?).
Headers, if arranged in alphabetical order, will give a build warning.
I think I know how to make it better.
And thanks for revewing that v6. I think those were the worst patch I
have ever posted.
You may do even more better. See below.
+#undef DEBUG
+#include <asm/byteorder.h>
(1)
+#include <linux/pci.h>
Squeez this to the rest
+#include <linux/8250_pci.h>
(2)
+#include <linux/bitops.h>
+#include <linux/delay.h>
+#include <linux/io.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/serial_core.h>
+#include <linux/serial_reg.h>
+#include <linux/slab.h>
+#include <linux/string.h>
+#include <linux/tty.h>
You perhaps need something like this here:
+ empty line
(1) +#include <asm/byteorder.h>
+
(2) +#include <linux/8250_pci.h>
+#include "8250.h"
<snip>
+
+#define PCI_NUM_BAR_RESOURCES 6
+static struct pci_device_id exar_pci_tbl[] = {
+ { PCI_DEVICE_SUB(PCI_VENDOR_ID_EXAR,
+ PCI_DEVICE_ID_EXAR_XR17C152,
+ PCI_SUBVENDOR_ID_CONNECT_TECH,
+ PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_232), 0, 0,
+ (kernel_ulong_t)&pbn_b0_2_1843200_200 },
You ignored my comment regarding to make a macro(s).
Moreover, some of data, like number of ports, can be easily calculated
from device ID.