mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-27 02:42:46 +00:00
vgapm: Use devclass_find to lookup the vga devclass in suspend and resume.
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D35009
This commit is contained in:
parent
0b377a49fa
commit
c1d90b2d02
@ -280,7 +280,7 @@ vgapm_suspend(device_t dev)
|
||||
error = bus_generic_suspend(dev);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
vga_dev = devclass_get_device(isavga_devclass, 0);
|
||||
vga_dev = devclass_get_device(devclass_find(VGA_DRIVER_NAME), 0);
|
||||
if (vga_dev == NULL)
|
||||
return (0);
|
||||
vga_suspend(vga_dev);
|
||||
@ -293,7 +293,7 @@ vgapm_resume(device_t dev)
|
||||
{
|
||||
device_t vga_dev;
|
||||
|
||||
vga_dev = devclass_get_device(isavga_devclass, 0);
|
||||
vga_dev = devclass_get_device(devclass_find(VGA_DRIVER_NAME), 0);
|
||||
if (vga_dev != NULL)
|
||||
vga_resume(vga_dev);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user