mediabay.c (1f1519ef597ae4628dbd47244f0f68d700231523) | mediabay.c (3a2d5b700132f35401f1d9e22fe3c2cab02c2549) |
---|---|
1/* 2 * Driver for the media bay on the PowerBook 3400 and 2400. 3 * 4 * Copyright (C) 1998 Paul Mackerras. 5 * 6 * Various evolutions by Benjamin Herrenschmidt & Henry Worth 7 * 8 * This program is free software; you can redistribute it and/or --- 684 unchanged lines hidden (view full) --- 693 return 0; 694 695} 696 697static int media_bay_suspend(struct macio_dev *mdev, pm_message_t state) 698{ 699 struct media_bay_info *bay = macio_get_drvdata(mdev); 700 | 1/* 2 * Driver for the media bay on the PowerBook 3400 and 2400. 3 * 4 * Copyright (C) 1998 Paul Mackerras. 5 * 6 * Various evolutions by Benjamin Herrenschmidt & Henry Worth 7 * 8 * This program is free software; you can redistribute it and/or --- 684 unchanged lines hidden (view full) --- 693 return 0; 694 695} 696 697static int media_bay_suspend(struct macio_dev *mdev, pm_message_t state) 698{ 699 struct media_bay_info *bay = macio_get_drvdata(mdev); 700 |
701 if (state.event != mdev->ofdev.dev.power.power_state.event && state.event == PM_EVENT_SUSPEND) { | 701 if (state.event != mdev->ofdev.dev.power.power_state.event 702 && (state.event & PM_EVENT_SLEEP)) { |
702 down(&bay->lock); 703 bay->sleeping = 1; 704 set_mb_power(bay, 0); 705 up(&bay->lock); 706 msleep(MB_POLL_DELAY); 707 mdev->ofdev.dev.power.power_state = state; 708 } 709 return 0; --- 129 unchanged lines hidden --- | 703 down(&bay->lock); 704 bay->sleeping = 1; 705 set_mb_power(bay, 0); 706 up(&bay->lock); 707 msleep(MB_POLL_DELAY); 708 mdev->ofdev.dev.power.power_state = state; 709 } 710 return 0; --- 129 unchanged lines hidden --- |