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

« back to all changes in this revision

Viewing changes to drivers/hv/vmbus_drv.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:
62
62
        struct hv_dev_port_info outbound;
63
63
};
64
64
 
 
65
static int vmbus_exists(void)
 
66
{
 
67
        if (hv_acpi_dev == NULL)
 
68
                return -ENODEV;
 
69
 
 
70
        return 0;
 
71
}
 
72
 
65
73
 
66
74
static void get_channel_info(struct hv_device *device,
67
75
                             struct hv_device_info *info)
590
598
 
591
599
        pr_info("registering driver %s\n", hv_driver->name);
592
600
 
 
601
        ret = vmbus_exists();
 
602
        if (ret < 0)
 
603
                return ret;
 
604
 
593
605
        hv_driver->driver.name = hv_driver->name;
594
606
        hv_driver->driver.owner = owner;
595
607
        hv_driver->driver.mod_name = mod_name;
614
626
{
615
627
        pr_info("unregistering driver %s\n", hv_driver->name);
616
628
 
617
 
        driver_unregister(&hv_driver->driver);
618
 
 
 
629
        if (!vmbus_exists())
 
630
                driver_unregister(&hv_driver->driver);
619
631
}
620
632
EXPORT_SYMBOL_GPL(vmbus_driver_unregister);
621
633
 
776
788
 
777
789
cleanup:
778
790
        acpi_bus_unregister_driver(&vmbus_acpi_driver);
 
791
        hv_acpi_dev = NULL;
779
792
        return ret;
780
793
}
781
794