From 8092d7c9789581eea478c40d615a2632c3af17bb Mon Sep 17 00:00:00 2001 From: David Vrabel Date: Thu, 16 Oct 2008 13:56:53 +0100 Subject: 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 --- drivers/usb/wusbcore/mmc.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'drivers/usb/wusbcore/mmc.c') diff --git a/drivers/usb/wusbcore/mmc.c b/drivers/usb/wusbcore/mmc.c index 76907286f15..cfa77a01ceb 100644 --- a/drivers/usb/wusbcore/mmc.c +++ b/drivers/usb/wusbcore/mmc.c @@ -93,7 +93,6 @@ int wusbhc_mmcie_set(struct wusbhc *wusbhc, u8 interval, u8 repeat_cnt, struct wuie_hdr *wuie) { int result = -ENOBUFS; - struct device *dev = wusbhc->dev; unsigned handle, itr; /* Search a handle, taking into account the ordering */ @@ -119,11 +118,8 @@ int wusbhc_mmcie_set(struct wusbhc *wusbhc, u8 interval, u8 repeat_cnt, if (wusbhc->mmcie[itr] == NULL) handle = itr; } - if (handle == ~0) { - if (printk_ratelimit()) - dev_err(dev, "MMC handle space exhausted\n"); + if (handle == ~0) goto error_unlock; - } } result = (wusbhc->mmcie_add)(wusbhc, interval, repeat_cnt, handle, wuie); @@ -143,15 +139,15 @@ EXPORT_SYMBOL_GPL(wusbhc_mmcie_set); void wusbhc_mmcie_rm(struct wusbhc *wusbhc, struct wuie_hdr *wuie) { int result; - struct device *dev = wusbhc->dev; unsigned handle, itr; mutex_lock(&wusbhc->mmcie_mutex); - for (itr = 0; itr < wusbhc->mmcies_max; itr++) + for (itr = 0; itr < wusbhc->mmcies_max; itr++) { if (wusbhc->mmcie[itr] == wuie) { handle = itr; goto found; } + } mutex_unlock(&wusbhc->mmcie_mutex); return; @@ -159,11 +155,7 @@ found: result = (wusbhc->mmcie_rm)(wusbhc, handle); if (result == 0) wusbhc->mmcie[itr] = NULL; - else if (printk_ratelimit()) - dev_err(dev, "MMC: Failed to remove IE %p (0x%02x)\n", - wuie, wuie->bIEIdentifier); mutex_unlock(&wusbhc->mmcie_mutex); - return; } EXPORT_SYMBOL_GPL(wusbhc_mmcie_rm); -- cgit v1.2.3