Date:2011-10-05 11:12:51 (8 years 11 months ago)
Author:Maarten ter Huurne
Commit:26e471649e850b91f5e7a185db984045e9be9319
Message:media: radio: RDA5807: Print fatal problems using dev_err instead of dev_warn.

Files: drivers/media/radio/radio-rda5807.c (5 diffs)

Change Details

drivers/media/radio/radio-rda5807.c
361361    u16 val;
362362
363363    if (!pdata) {
364        dev_warn(&client->dev, "Platform data missing\n");
364        dev_err(&client->dev, "Platform data missing\n");
365365        return -EINVAL;
366366    }
367367
368368    err = rda5807_i2c_read(client, RDA5807_REG_CHIPID);
369369    if (err < 0) {
370        dev_warn(&client->dev, "Failed to read chip ID (%d)\n", err);
370        dev_err(&client->dev, "Failed to read chip ID (%d)\n", err);
371371        return err;
372372    }
373373    val = err;
374374    if ((val & 0xFF00) != 0x5800) {
375        dev_warn(&client->dev, "Chip ID mismatch: "
376                       "expected 58xx, got %04X\n", val);
375        dev_err(&client->dev, "Chip ID mismatch: "
376                      "expected 58xx, got %04X\n", val);
377377        return -ENODEV;
378378    }
379379    dev_info(&client->dev, "Found FM radio receiver\n");
...... 
382382
383383    radio = kzalloc(sizeof(*radio), GFP_KERNEL);
384384    if (!radio) {
385        dev_warn(&client->dev, "Failed to allocate driver data\n");
385        dev_err(&client->dev, "Failed to allocate driver data\n");
386386        return -ENOMEM;
387387    }
388388
...... 
401401                   V4L2_PREEMPHASIS_50_uS);
402402    err = radio->ctrl_handler.error;
403403    if (err) {
404        dev_warn(&client->dev, "Failed to init controls handler"
405             " (%d)\n", err);
404        dev_err(&client->dev, "Failed to init controls handler (%d)\n",
405            err);
406406        goto err_ctrl_free;
407407    }
408408
...... 
420420
421421    err = video_register_device(&radio->video_dev, VFL_TYPE_RADIO, -1);
422422    if (err < 0) {
423        dev_warn(&client->dev, "Failed to register video device (%d)\n",
424                       err);
423        dev_err(&client->dev, "Failed to register video device (%d)\n",
424                      err);
425425        goto err_ctrl_free;
426426    }
427427
...... 
456456
457457    err = v4l2_ctrl_handler_setup(&radio->ctrl_handler);
458458    if (err < 0) {
459        dev_warn(&client->dev, "Failed to set default control values"
460                       " (%d)\n", err);
459        dev_err(&client->dev, "Failed to set default control values"
460                      " (%d)\n", err);
461461        goto err_video_unreg;
462462    }
463463

Archive Download the corresponding diff file



interactive