~ubuntu-branches/ubuntu/quantal/linux-lowlatency/quantal

« back to all changes in this revision

Viewing changes to drivers/base/firmware_class.c

  • Committer: Package Import Robot
  • Author(s): Alessio Igor Bogani
  • Date: 2011-10-26 11:13:05 UTC
  • Revision ID: package-import@ubuntu.com-20111026111305-04kado7d1u2er2rl
Tags: 3.2.0-16.25
Add new lowlatency kernel flavour

Show diffs side-by-side

added added

removed removed

Lines of Context:
226
226
        int loading = simple_strtol(buf, NULL, 10);
227
227
        int i;
228
228
 
 
229
        mutex_lock(&fw_lock);
 
230
 
 
231
        if (!fw_priv->fw)
 
232
                goto out;
 
233
 
229
234
        switch (loading) {
230
235
        case 1:
231
 
                mutex_lock(&fw_lock);
232
 
                if (!fw_priv->fw) {
233
 
                        mutex_unlock(&fw_lock);
234
 
                        break;
235
 
                }
236
236
                firmware_free_data(fw_priv->fw);
237
237
                memset(fw_priv->fw, 0, sizeof(struct firmware));
238
238
                /* If the pages are not owned by 'struct firmware' */
243
243
                fw_priv->page_array_size = 0;
244
244
                fw_priv->nr_pages = 0;
245
245
                set_bit(FW_STATUS_LOADING, &fw_priv->status);
246
 
                mutex_unlock(&fw_lock);
247
246
                break;
248
247
        case 0:
249
248
                if (test_bit(FW_STATUS_LOADING, &fw_priv->status)) {
274
273
                fw_load_abort(fw_priv);
275
274
                break;
276
275
        }
277
 
 
 
276
out:
 
277
        mutex_unlock(&fw_lock);
278
278
        return count;
279
279
}
280
280