ar71xx: only allow internal access to the ar7240 switch, export the MDIO bus behind...
[openwrt.git] / target / linux / leon / patches / 025-greth_bootloader_disable_device_node.patch
1 From 66d5b37cc6d32291419bf99161e83e2946ea5f25 Mon Sep 17 00:00:00 2001
2 From: Daniel Hellstrom <daniel@gaisler.com>
3 Date: Wed, 1 Dec 2010 12:11:03 +0100
4 Subject: [PATCH] GRETH: added option to disable a device node from bootloader.
5
6 Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
7 ---
8 drivers/net/greth.c | 6 ++++++
9 1 files changed, 6 insertions(+), 0 deletions(-)
10
11 --- a/drivers/net/greth.c
12 +++ b/drivers/net/greth.c
13 @@ -1428,6 +1428,12 @@ static int __devinit greth_of_probe(stru
14 int err;
15 int tmp;
16 unsigned long timeout;
17 + int *ampopts;
18 +
19 + /* Skip device if used by another OS instance */
20 + ampopts = (int *) of_get_property(ofdev->dev.of_node, "ampopts", NULL);
21 + if (ampopts && (*ampopts == 0))
22 + return -EIO;
23
24 dev = alloc_etherdev(sizeof(struct greth_private));
25
This page took 0.047345 seconds and 5 git commands to generate.