linux-mips
[Top] [All Lists]

[PATCH 1/2] bcm63xx: make bcm63xx_uart_register an initfunc

To: Ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH 1/2] bcm63xx: make bcm63xx_uart_register an initfunc
From: Florian Fainelli <florian@openwrt.org>
Date: Mon, 10 Aug 2009 21:42:54 +0200
Cc: linux-mips@linux-mips.org, Maxime Bizon <mbizon@freebox.fr>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:date:subject :mime-version:x-uid:x-length:to:cc:content-type :content-transfer-encoding:content-disposition:message-id; bh=cw3xRnjTmFmgNUYqydMzXzY1c+waWOJI+0an7fNi2fM=; b=M6rzJGlIY6pUcxY5vGUBxnBhjZZHyvXgtMDOLYBPXb4/nBa3yduufPDUDzlXPiu0ml RRpEQEap7G7DKPn7dlj9+1afVE/IiDpwPCIT3jDhPcQyvjXxE//C6scggt8vhVwd0lk4 zooBZRicLMOimbV/KdxEoH34f6fPTGMNJNwkk=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:date:subject:mime-version:x-uid:x-length:to:cc :content-type:content-transfer-encoding:content-disposition :message-id; b=QmosTIUgr+1JrwpJh9Y6u1IhIW3Z2VTpMo3Frp3rCLLa94trYN4Leg2ry8xc8Reeeb AIreAulOyq2qESio7dXWXSruWToJEjE8kivgyNbMqn5w2kSgRSf7dAiuCs7hOlKbAoVP pdL35noCVQ5NvzIFVlIgcLvkj0Exa6PuwVIw0=
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
This patch removes the calls to bcm63xx_uart_register in
board_bcm963xx.c and make bcm63xx_uart_register an initfunc.
Allows us to remove bcm63xx_dev_uart.h which was there to
make checkpatch.pl happy. Tested on my Tecom GW6x00.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
diff --git a/arch/mips/bcm63xx/boards/board_bcm963xx.c 
b/arch/mips/bcm63xx/boards/board_bcm963xx.c
index 17a8636..1d56ef6 100644
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -22,7 +22,6 @@
 #include <bcm63xx_io.h>
 #include <bcm63xx_board.h>
 #include <bcm63xx_dev_pci.h>
-#include <bcm63xx_dev_uart.h>
 #include <bcm63xx_dev_enet.h>
 #include <bcm63xx_dev_pcmcia.h>
 #include <bcm63xx_dev_usb_ohci.h>
@@ -797,8 +796,6 @@ int __init board_register_devices(void)
 {
        u32 val;
 
-       bcm63xx_uart_register();
-
        if (board.has_pccard)
                bcm63xx_pcmcia_register();
 
diff --git a/arch/mips/bcm63xx/dev-uart.c b/arch/mips/bcm63xx/dev-uart.c
index 5f3d89c..b051946 100644
--- a/arch/mips/bcm63xx/dev-uart.c
+++ b/arch/mips/bcm63xx/dev-uart.c
@@ -10,7 +10,6 @@
 #include <linux/kernel.h>
 #include <linux/platform_device.h>
 #include <bcm63xx_cpu.h>
-#include <bcm63xx_dev_uart.h>
 
 static struct resource uart_resources[] = {
        {
@@ -39,3 +38,4 @@ int __init bcm63xx_uart_register(void)
        uart_resources[1].start = bcm63xx_get_irq_number(IRQ_UART0);
        return platform_device_register(&bcm63xx_uart_device);
 }
+arch_initcall(bcm63xx_uart_register);
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_uart.h 
b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_uart.h
deleted file mode 100644
index bf348f5..0000000
--- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_uart.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef BCM63XX_DEV_UART_H_
-#define BCM63XX_DEV_UART_H_
-
-int bcm63xx_uart_register(void);
-
-#endif /* BCM63XX_DEV_UART_H_ */

<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH 1/2] bcm63xx: make bcm63xx_uart_register an initfunc, Florian Fainelli <=