Commit 7ae28324 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Moxa serial compile fixes

From: Geert Uytterhoeven <geert@linux-m68k.org>

Compile fixes for the Moxa serial drivers:

- Add missing #include <linux/init.h>

- Kill warning if CONFIG_PCI is not set
parent 03c3da32
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
#include <linux/tty_driver.h> #include <linux/tty_driver.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/init.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -292,7 +293,7 @@ static struct tty_operations moxa_ops = { ...@@ -292,7 +293,7 @@ static struct tty_operations moxa_ops = {
static int __init moxa_init(void) static int __init moxa_init(void)
{ {
int i, n, numBoards; int i, numBoards;
struct moxa_str *ch; struct moxa_str *ch;
printk(KERN_INFO "MOXA Intellio family driver version %s\n", MOXA_VERSION); printk(KERN_INFO "MOXA Intellio family driver version %s\n", MOXA_VERSION);
...@@ -410,7 +411,7 @@ static int __init moxa_init(void) ...@@ -410,7 +411,7 @@ static int __init moxa_init(void)
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
{ {
struct pci_dev *p = NULL; struct pci_dev *p = NULL;
n = (sizeof(moxa_pcibrds) / sizeof(moxa_pcibrds[0])) - 1; int n = (sizeof(moxa_pcibrds) / sizeof(moxa_pcibrds[0])) - 1;
i = 0; i = 0;
while (i < n) { while (i < n) {
while ((p = pci_find_device(moxa_pcibrds[i].vendor, moxa_pcibrds[i].device, p))!=NULL) while ((p = pci_find_device(moxa_pcibrds[i].vendor, moxa_pcibrds[i].device, p))!=NULL)
......
...@@ -56,6 +56,7 @@ ...@@ -56,6 +56,7 @@
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/smp_lock.h> #include <linux/smp_lock.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/init.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -496,7 +497,6 @@ static struct tty_operations mxser_ops = { ...@@ -496,7 +497,6 @@ static struct tty_operations mxser_ops = {
static int __init mxser_module_init(void) static int __init mxser_module_init(void)
{ {
int i, m, retval, b; int i, m, retval, b;
int n, index;
struct mxser_hwconf hwconf; struct mxser_hwconf hwconf;
mxvar_sdriver = alloc_tty_driver(MXSER_PORTS + 1); mxvar_sdriver = alloc_tty_driver(MXSER_PORTS + 1);
...@@ -600,9 +600,8 @@ static int __init mxser_module_init(void) ...@@ -600,9 +600,8 @@ static int __init mxser_module_init(void)
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
{ {
struct pci_dev *pdev = NULL; struct pci_dev *pdev = NULL;
int n = (sizeof(mxser_pcibrds) / sizeof(mxser_pcibrds[0])) - 1;
n = (sizeof(mxser_pcibrds) / sizeof(mxser_pcibrds[0])) - 1; int index = 0;
index = 0;
for (b = 0; b < n; b++) { for (b = 0; b < n; b++) {
while ((pdev = pci_find_device(mxser_pcibrds[b].vendor, mxser_pcibrds[b].device, pdev))) while ((pdev = pci_find_device(mxser_pcibrds[b].vendor, mxser_pcibrds[b].device, pdev)))
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment