| 220 | | static int VBoxDrvLinuxInit(void); |
|---|
| 221 | | static void VBoxDrvLinuxUnload(void); |
|---|
| 222 | | static int VBoxDrvLinuxCreate(struct inode *pInode, struct file *pFilp); |
|---|
| 223 | | static int VBoxDrvLinuxClose(struct inode *pInode, struct file *pFilp); |
|---|
| | 229 | static int VBoxDrvLinuxInit(void); |
|---|
| | 230 | static void VBoxDrvLinuxUnload(void); |
|---|
| | 231 | static int VBoxDrvLinuxCreate(struct inode *pInode, struct file *pFilp); |
|---|
| | 232 | static int VBoxDrvLinuxClose(struct inode *pInode, struct file *pFilp); |
|---|
| 227 | | static int VBoxDrvLinuxIOCtl(struct inode *pInode, struct file *pFilp, unsigned int uCmd, unsigned long ulArg); |
|---|
| 228 | | #endif |
|---|
| 229 | | static int VBoxDrvLinuxIOCtlSlow(struct file *pFilp, unsigned int uCmd, unsigned long ulArg); |
|---|
| 230 | | static int VBoxDrvLinuxErr2LinuxErr(int); |
|---|
| 231 | | |
|---|
| | 236 | static int VBoxDrvLinuxIOCtl(struct inode *pInode, struct file *pFilp, unsigned int uCmd, unsigned long ulArg); |
|---|
| | 237 | #endif |
|---|
| | 238 | static int VBoxDrvLinuxIOCtlSlow(struct file *pFilp, unsigned int uCmd, unsigned long ulArg); |
|---|
| | 239 | static int VBoxDrvLinuxErr2LinuxErr(int); |
|---|
| | 240 | #ifdef VBOX_WITH_SUSPEND_NOTIFICATION |
|---|
| | 241 | static int VBoxDrvProbe(struct platform_device *pDev); |
|---|
| | 242 | static int VBoxDrvSuspend(struct platform_device *pDev, pm_message_t State); |
|---|
| | 243 | static int VBoxDrvResume(struct platform_device *pDev); |
|---|
| | 244 | static void VBoxDevRelease(struct device *pDev); |
|---|
| | 245 | #endif |
|---|
| 564 | | "'normal'" |
|---|
| 565 | | #endif |
|---|
| 566 | | ".\n", |
|---|
| 567 | | g_DevExt.pGip->u32Mode == SUPGIPMODE_SYNC_TSC ? "'synchronous'" : "'asynchronous'"); |
|---|
| 568 | | LogFlow(("VBoxDrv::ModuleInit returning %#x\n", rc)); |
|---|
| 569 | | printk(KERN_DEBUG DEVICE_NAME ": Successfully loaded version " |
|---|
| 570 | | VBOX_VERSION_STRING " (interface " xstr(SUPDRV_IOC_VERSION) ").\n"); |
|---|
| 571 | | return rc; |
|---|
| | 608 | "'normal'" |
|---|
| | 609 | #endif |
|---|
| | 610 | ".\n", |
|---|
| | 611 | g_DevExt.pGip->u32Mode == SUPGIPMODE_SYNC_TSC ? "'synchronous'" : "'asynchronous'"); |
|---|
| | 612 | LogFlow(("VBoxDrv::ModuleInit returning %#x\n", rc)); |
|---|
| | 613 | printk(KERN_DEBUG DEVICE_NAME ": Successfully loaded version " |
|---|
| | 614 | VBOX_VERSION_STRING " (interface " xstr(SUPDRV_IOC_VERSION) ").\n"); |
|---|
| | 615 | return rc; |
|---|
| | 616 | } |
|---|
| | 617 | #ifdef VBOX_WITH_SUSPEND_NOTIFICATION |
|---|
| | 618 | else |
|---|
| | 619 | platform_driver_unregister(&gPlatformDriver); |
|---|
| | 620 | } |
|---|
| | 621 | #endif |
|---|
| | 746 | |
|---|
| | 747 | |
|---|
| | 748 | #ifdef VBOX_WITH_SUSPEND_NOTIFICATION |
|---|
| | 749 | /** |
|---|
| | 750 | * Dummy device release function. We have to provide this function, |
|---|
| | 751 | * otherwise the kernel will complain. |
|---|
| | 752 | * |
|---|
| | 753 | * @param pDev Pointer to the platform device. |
|---|
| | 754 | */ |
|---|
| | 755 | static void VBoxDevRelease(struct device *pDev) |
|---|
| | 756 | { |
|---|
| | 757 | } |
|---|
| | 758 | |
|---|
| | 759 | /** |
|---|
| | 760 | * Dummy probe function. |
|---|
| | 761 | * |
|---|
| | 762 | * @param pDev Pointer to the platform device. |
|---|
| | 763 | */ |
|---|
| | 764 | static int VBoxDrvProbe(struct platform_device *pDev) |
|---|
| | 765 | { |
|---|
| | 766 | return 0; |
|---|
| | 767 | } |
|---|
| | 768 | |
|---|
| | 769 | /** |
|---|
| | 770 | * Suspend callback. |
|---|
| | 771 | * @param pDev Pointer to the platform device. |
|---|
| | 772 | * @param State message type, see Documentation/power/devices.txt. |
|---|
| | 773 | */ |
|---|
| | 774 | static int VBoxDrvSuspend(struct platform_device *pDev, pm_message_t State) |
|---|
| | 775 | { |
|---|
| | 776 | RTPowerSignalEvent(RTPOWEREVENT_SUSPEND); |
|---|
| | 777 | return 0; |
|---|
| | 778 | } |
|---|
| | 779 | |
|---|
| | 780 | /** |
|---|
| | 781 | * Resume callback. |
|---|
| | 782 | * |
|---|
| | 783 | * @param pDev Pointer to the platform device. |
|---|
| | 784 | */ |
|---|
| | 785 | static int VBoxDrvResume(struct platform_device *pDev) |
|---|
| | 786 | { |
|---|
| | 787 | RTPowerSignalEvent(RTPOWEREVENT_RESUME); |
|---|
| | 788 | return 0; |
|---|
| | 789 | } |
|---|
| | 790 | #endif /* VBOX_WITH_SUSPEND_NOTIFICATION */ |
|---|