~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/hwmon/k8temp.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
252
252
 
253
253
        data->name = "k8temp";
254
254
        mutex_init(&data->update_lock);
255
 
        dev_set_drvdata(&pdev->dev, data);
 
255
        pci_set_drvdata(pdev, data);
256
256
 
257
257
        /* Register sysfs hooks */
258
258
        err = device_create_file(&pdev->dev,
307
307
                           &sensor_dev_attr_temp4_input.dev_attr);
308
308
        device_remove_file(&pdev->dev, &dev_attr_name);
309
309
exit_free:
310
 
        dev_set_drvdata(&pdev->dev, NULL);
 
310
        pci_set_drvdata(pdev, NULL);
311
311
        kfree(data);
312
312
exit:
313
313
        return err;
315
315
 
316
316
static void __devexit k8temp_remove(struct pci_dev *pdev)
317
317
{
318
 
        struct k8temp_data *data = dev_get_drvdata(&pdev->dev);
 
318
        struct k8temp_data *data = pci_get_drvdata(pdev);
319
319
 
320
320
        hwmon_device_unregister(data->hwmon_dev);
321
321
        device_remove_file(&pdev->dev,
327
327
        device_remove_file(&pdev->dev,
328
328
                           &sensor_dev_attr_temp4_input.dev_attr);
329
329
        device_remove_file(&pdev->dev, &dev_attr_name);
330
 
        dev_set_drvdata(&pdev->dev, NULL);
 
330
        pci_set_drvdata(pdev, NULL);
331
331
        kfree(data);
332
332
}
333
333