aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/ldc.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2007-07-12 02:22:55 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-07-16 07:04:24 -0400
commit133f09a169f3022be3de671b29658b7ecb375022 (patch)
treec30e7d34eceb96dd1b0d2b999713bc99f74efbdd /arch/sparc64/kernel/ldc.c
parente450992d13ffaec6dde4bbbd308b834ae9fc3708 (diff)
[SPARC64]: Use more mearningful names for IRQ registry.
All of the interrupts say "LDX RX" and "LDX TX" currently which is next to useless. Put a device specific prefix before "RX" and "TX" instead which makes it much more useful. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/ldc.c')
-rw-r--r--arch/sparc64/kernel/ldc.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/arch/sparc64/kernel/ldc.c b/arch/sparc64/kernel/ldc.c
index 4cba28685967..dbb65b674a67 100644
--- a/arch/sparc64/kernel/ldc.c
+++ b/arch/sparc64/kernel/ldc.c
@@ -158,6 +158,10 @@ struct ldc_channel {
158 u8 mss; 158 u8 mss;
159 u8 state; 159 u8 state;
160 160
161#define LDC_IRQ_NAME_MAX 32
162 char rx_irq_name[LDC_IRQ_NAME_MAX];
163 char tx_irq_name[LDC_IRQ_NAME_MAX];
164
161 struct hlist_head mh_list; 165 struct hlist_head mh_list;
162 166
163 struct hlist_node list; 167 struct hlist_node list;
@@ -1226,25 +1230,31 @@ EXPORT_SYMBOL(ldc_free);
1226 * state. This does not initiate a handshake, ldc_connect() does 1230 * state. This does not initiate a handshake, ldc_connect() does
1227 * that. 1231 * that.
1228 */ 1232 */
1229int ldc_bind(struct ldc_channel *lp) 1233int ldc_bind(struct ldc_channel *lp, const char *name)
1230{ 1234{
1231 unsigned long hv_err, flags; 1235 unsigned long hv_err, flags;
1232 int err = -EINVAL; 1236 int err = -EINVAL;
1233 1237
1234 spin_lock_irqsave(&lp->lock, flags); 1238 spin_lock_irqsave(&lp->lock, flags);
1235 1239
1240 if (!name)
1241 goto out_err;
1242
1236 if (lp->state != LDC_STATE_INIT) 1243 if (lp->state != LDC_STATE_INIT)
1237 goto out_err; 1244 goto out_err;
1238 1245
1246 snprintf(lp->rx_irq_name, LDC_IRQ_NAME_MAX, "%s RX", name);
1247 snprintf(lp->tx_irq_name, LDC_IRQ_NAME_MAX, "%s TX", name);
1248
1239 err = request_irq(lp->cfg.rx_irq, ldc_rx, 1249 err = request_irq(lp->cfg.rx_irq, ldc_rx,
1240 IRQF_SAMPLE_RANDOM | IRQF_SHARED, 1250 IRQF_SAMPLE_RANDOM | IRQF_SHARED,
1241 "LDC RX", lp); 1251 lp->rx_irq_name, lp);
1242 if (err) 1252 if (err)
1243 goto out_err; 1253 goto out_err;
1244 1254
1245 err = request_irq(lp->cfg.tx_irq, ldc_tx, 1255 err = request_irq(lp->cfg.tx_irq, ldc_tx,
1246 IRQF_SAMPLE_RANDOM | IRQF_SHARED, 1256 IRQF_SAMPLE_RANDOM | IRQF_SHARED,
1247 "LDC TX", lp); 1257 lp->tx_irq_name, lp);
1248 if (err) 1258 if (err)
1249 goto out_free_rx_irq; 1259 goto out_free_rx_irq;
1250 1260