Changeset 21949 in vbox for trunk/src/VBox/HostDrivers/Support
- Timestamp:
- Aug 3, 2009 6:42:45 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 50637
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
r21682 r21949 181 181 #ifdef VBOX_WITH_SUSPEND_NOTIFICATION 182 182 static int VBoxDrvProbe(struct platform_device *pDev); 183 # if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30) 184 static int VBoxDrvSuspend(struct device *pDev); 185 static int VBoxDrvResume(struct device *pDev); 186 # else 183 187 static int VBoxDrvSuspend(struct platform_device *pDev, pm_message_t State); 184 188 static int VBoxDrvResume(struct platform_device *pDev); 189 # endif 185 190 static void VBoxDevRelease(struct device *pDev); 186 191 #endif … … 214 219 215 220 #ifdef VBOX_WITH_SUSPEND_NOTIFICATION 216 static struct platform_driver gPlatformDriver = 217 { 218 .probe = VBoxDrvProbe, 221 # if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30) 222 static struct dev_pm_ops gPlatformPMOps = 223 { 219 224 .suspend = VBoxDrvSuspend, 220 225 .resume = VBoxDrvResume, 226 }; 227 # endif 228 229 static struct platform_driver gPlatformDriver = 230 { 231 .probe = VBoxDrvProbe, 232 # if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30) 233 .suspend = VBoxDrvSuspend, 234 .resume = VBoxDrvResume, 235 # endif 221 236 /** @todo .shutdown? */ 222 237 .driver = 223 238 { 224 .name = "vboxdrv" 239 .name = "vboxdrv", 240 # if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30) 241 .pm = &gPlatformPMOps, 242 # endif 225 243 } 226 244 }; … … 735 753 * @param State message type, see Documentation/power/devices.txt. 736 754 */ 755 # if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30) 756 static int VBoxDrvSuspend(struct device *pDev) 757 # else 737 758 static int VBoxDrvSuspend(struct platform_device *pDev, pm_message_t State) 759 # endif 738 760 { 739 761 RTPowerSignalEvent(RTPOWEREVENT_SUSPEND); … … 746 768 * @param pDev Pointer to the platform device. 747 769 */ 770 # if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30) 771 static int VBoxDrvResume(struct device *pDev) 772 # else 748 773 static int VBoxDrvResume(struct platform_device *pDev) 774 # endif 749 775 { 750 776 RTPowerSignalEvent(RTPOWEREVENT_RESUME);
Note:
See TracChangeset
for help on using the changeset viewer.