diff options
author | Alexandre Bounine <alexandre.bounine@idt.com> | 2010-05-26 17:44:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-27 12:12:51 -0400 |
commit | 058f88d672b3161fe511ebe2996c3faef63c1c8e (patch) | |
tree | fb4bb8d93aef661cc9e24e1e6e2e8bd4edc2e764 /drivers/rapidio/switches/tsi568.c | |
parent | 011507e49a696462c30914e2eeebcdda33ed30f8 (diff) |
rapidio: modify initialization of switch operations
Modify the way how RapidIO switch operations are declared. Multiple
assignments through the linker script replaced by single initialization
call.
Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Li Yang <leoli@freescale.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Thomas Moll <thomas.moll@sysgo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rapidio/switches/tsi568.c')
-rw-r--r-- | drivers/rapidio/switches/tsi568.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/rapidio/switches/tsi568.c b/drivers/rapidio/switches/tsi568.c index 905cf9cb09cc..322840d43832 100644 --- a/drivers/rapidio/switches/tsi568.c +++ b/drivers/rapidio/switches/tsi568.c | |||
@@ -2,6 +2,10 @@ | |||
2 | * RapidIO Tsi568 switch support | 2 | * RapidIO Tsi568 switch support |
3 | * | 3 | * |
4 | * Copyright 2009-2010 Integrated Device Technology, Inc. | 4 | * Copyright 2009-2010 Integrated Device Technology, Inc. |
5 | * Alexandre Bounine <alexandre.bounine@idt.com> | ||
6 | * - Added EM support | ||
7 | * - Modified switch operations initialization. | ||
8 | * | ||
5 | * Copyright 2005 MontaVista Software, Inc. | 9 | * Copyright 2005 MontaVista Software, Inc. |
6 | * Matt Porter <mporter@kernel.crashing.org> | 10 | * Matt Porter <mporter@kernel.crashing.org> |
7 | * | 11 | * |
@@ -106,8 +110,6 @@ tsi568_route_clr_table(struct rio_mport *mport, u16 destid, u8 hopcount, | |||
106 | return 0; | 110 | return 0; |
107 | } | 111 | } |
108 | 112 | ||
109 | DECLARE_RIO_ROUTE_OPS(RIO_VID_TUNDRA, RIO_DID_TSI568, tsi568_route_add_entry, tsi568_route_get_entry, tsi568_route_clr_table); | ||
110 | |||
111 | static int | 113 | static int |
112 | tsi568_em_init(struct rio_dev *rdev) | 114 | tsi568_em_init(struct rio_dev *rdev) |
113 | { | 115 | { |
@@ -127,4 +129,16 @@ tsi568_em_init(struct rio_dev *rdev) | |||
127 | return 0; | 129 | return 0; |
128 | } | 130 | } |
129 | 131 | ||
130 | DECLARE_RIO_EM_OPS(RIO_VID_TUNDRA, RIO_DID_TSI568, tsi568_em_init, NULL); | 132 | static int tsi568_switch_init(struct rio_dev *rdev, int do_enum) |
133 | { | ||
134 | pr_debug("RIO: %s for %s\n", __func__, rio_name(rdev)); | ||
135 | rdev->rswitch->add_entry = tsi568_route_add_entry; | ||
136 | rdev->rswitch->get_entry = tsi568_route_get_entry; | ||
137 | rdev->rswitch->clr_table = tsi568_route_clr_table; | ||
138 | rdev->rswitch->em_init = tsi568_em_init; | ||
139 | rdev->rswitch->em_handle = NULL; | ||
140 | |||
141 | return 0; | ||
142 | } | ||
143 | |||
144 | DECLARE_RIO_SWITCH_INIT(RIO_VID_TUNDRA, RIO_DID_TSI568, tsi568_switch_init); | ||