aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/wusbcore/mmc.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/usb/wusbcore/mmc.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/usb/wusbcore/mmc.c')
-rw-r--r--drivers/usb/wusbcore/mmc.c14
1 files changed, 3 insertions, 11 deletions
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,
93 struct wuie_hdr *wuie) 93 struct wuie_hdr *wuie)
94{ 94{
95 int result = -ENOBUFS; 95 int result = -ENOBUFS;
96 struct device *dev = wusbhc->dev;
97 unsigned handle, itr; 96 unsigned handle, itr;
98 97
99 /* Search a handle, taking into account the ordering */ 98 /* Search a handle, taking into account the ordering */
@@ -119,11 +118,8 @@ int wusbhc_mmcie_set(struct wusbhc *wusbhc, u8 interval, u8 repeat_cnt,
119 if (wusbhc->mmcie[itr] == NULL) 118 if (wusbhc->mmcie[itr] == NULL)
120 handle = itr; 119 handle = itr;
121 } 120 }
122 if (handle == ~0) { 121 if (handle == ~0)
123 if (printk_ratelimit())
124 dev_err(dev, "MMC handle space exhausted\n");
125 goto error_unlock; 122 goto error_unlock;
126 }
127 } 123 }
128 result = (wusbhc->mmcie_add)(wusbhc, interval, repeat_cnt, handle, 124 result = (wusbhc->mmcie_add)(wusbhc, interval, repeat_cnt, handle,
129 wuie); 125 wuie);
@@ -143,15 +139,15 @@ EXPORT_SYMBOL_GPL(wusbhc_mmcie_set);
143void wusbhc_mmcie_rm(struct wusbhc *wusbhc, struct wuie_hdr *wuie) 139void wusbhc_mmcie_rm(struct wusbhc *wusbhc, struct wuie_hdr *wuie)
144{ 140{
145 int result; 141 int result;
146 struct device *dev = wusbhc->dev;
147 unsigned handle, itr; 142 unsigned handle, itr;
148 143
149 mutex_lock(&wusbhc->mmcie_mutex); 144 mutex_lock(&wusbhc->mmcie_mutex);
150 for (itr = 0; itr < wusbhc->mmcies_max; itr++) 145 for (itr = 0; itr < wusbhc->mmcies_max; itr++) {
151 if (wusbhc->mmcie[itr] == wuie) { 146 if (wusbhc->mmcie[itr] == wuie) {
152 handle = itr; 147 handle = itr;
153 goto found; 148 goto found;
154 } 149 }
150 }
155 mutex_unlock(&wusbhc->mmcie_mutex); 151 mutex_unlock(&wusbhc->mmcie_mutex);
156 return; 152 return;
157 153
@@ -159,11 +155,7 @@ found:
159 result = (wusbhc->mmcie_rm)(wusbhc, handle); 155 result = (wusbhc->mmcie_rm)(wusbhc, handle);
160 if (result == 0) 156 if (result == 0)
161 wusbhc->mmcie[itr] = NULL; 157 wusbhc->mmcie[itr] = NULL;
162 else if (printk_ratelimit())
163 dev_err(dev, "MMC: Failed to remove IE %p (0x%02x)\n",
164 wuie, wuie->bIEIdentifier);
165 mutex_unlock(&wusbhc->mmcie_mutex); 158 mutex_unlock(&wusbhc->mmcie_mutex);
166 return;
167} 159}
168EXPORT_SYMBOL_GPL(wusbhc_mmcie_rm); 160EXPORT_SYMBOL_GPL(wusbhc_mmcie_rm);
169 161