aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/uwb/uwbd.c
diff options
context:
space:
mode:
authorDavid Vrabel <dv02@dv02pc01.europe.root.pri>2008-10-16 08:56:53 -0400
committerDavid Vrabel <dv02@dv02pc01.europe.root.pri>2008-10-16 08:56:53 -0400
commit8092d7c9789581eea478c40d615a2632c3af17bb (patch)
treea9fccedfcdbfd9a74220aa99d48fa8a003313deb /drivers/uwb/uwbd.c
parent92c4d9bd1648b3eaca6b8b8f8932eec390ba7327 (diff)
uwb: don't use printk_ratelimit() so often
Avoid using printk_ratelimit() in many places because: - many were error messages reporting broken hardware (it's useful to get all of these). - the message itself wasn't useful so the message has been removed. Signed-off-by: David Vrabel <david.vrabel@csr.com>
Diffstat (limited to 'drivers/uwb/uwbd.c')
-rw-r--r--drivers/uwb/uwbd.c29
1 files changed, 6 insertions, 23 deletions
diff --git a/drivers/uwb/uwbd.c b/drivers/uwb/uwbd.c
index b3673d614adb..78908416e42c 100644
--- a/drivers/uwb/uwbd.c
+++ b/drivers/uwb/uwbd.c
@@ -188,7 +188,6 @@ static DEFINE_MUTEX(uwbd_event_mutex);
188static 188static
189int uwbd_event_handle_urc(struct uwb_event *evt) 189int uwbd_event_handle_urc(struct uwb_event *evt)
190{ 190{
191 int result;
192 struct uwbd_evt_type_handler *type_table; 191 struct uwbd_evt_type_handler *type_table;
193 uwbd_evt_handler_f handler; 192 uwbd_evt_handler_f handler;
194 u8 type, context; 193 u8 type, context;
@@ -199,41 +198,25 @@ int uwbd_event_handle_urc(struct uwb_event *evt)
199 context = evt->notif.rceb->bEventContext; 198 context = evt->notif.rceb->bEventContext;
200 199
201 if (type > uwbd_evt_type_handlers_len) { 200 if (type > uwbd_evt_type_handlers_len) {
202 if (printk_ratelimit()) 201 printk(KERN_ERR "UWBD: event type %u: unknown (too high)\n", type);
203 printk(KERN_ERR "UWBD: event type %u: unknown "
204 "(too high)\n", type);
205 return -EINVAL; 202 return -EINVAL;
206 } 203 }
207 type_table = &uwbd_evt_type_handlers[type]; 204 type_table = &uwbd_evt_type_handlers[type];
208 if (type_table->uwbd_events == NULL) { 205 if (type_table->uwbd_events == NULL) {
209 if (printk_ratelimit()) 206 printk(KERN_ERR "UWBD: event type %u: unknown\n", type);
210 printk(KERN_ERR "UWBD: event type %u: unknown\n", type);
211 return -EINVAL; 207 return -EINVAL;
212 } 208 }
213 if (event > type_table->size) { 209 if (event > type_table->size) {
214 if (printk_ratelimit()) 210 printk(KERN_ERR "UWBD: event %s[%u]: unknown (too high)\n",
215 printk(KERN_ERR "UWBD: event %s[%u]: " 211 type_table->name, event);
216 "unknown (too high)\n", type_table->name, event);
217 return -EINVAL; 212 return -EINVAL;
218 } 213 }
219 handler = type_table->uwbd_events[event].handler; 214 handler = type_table->uwbd_events[event].handler;
220 if (handler == NULL) { 215 if (handler == NULL) {
221 if (printk_ratelimit()) 216 printk(KERN_ERR "UWBD: event %s[%u]: unknown\n", type_table->name, event);
222 printk(KERN_ERR "UWBD: event %s[%u]: unknown\n",
223 type_table->name, event);
224 return -EINVAL; 217 return -EINVAL;
225 } 218 }
226 d_printf(3, NULL, "processing 0x%02x/%04x/%02x, %zu bytes\n", 219 return (*handler)(evt);
227 type, event, context, evt->notif.size);
228 result = (*handler)(evt);
229 if (result < 0) {
230 if (printk_ratelimit())
231 printk(KERN_ERR "UWBD: event 0x%02x/%04x/%02x, "
232 "table %s[%u]: handling failed: %d\n",
233 type, event, context, type_table->name,
234 event, result);
235 }
236 return result;
237} 220}
238 221
239static void uwbd_event_handle_message(struct uwb_event *evt) 222static void uwbd_event_handle_message(struct uwb_event *evt)