diff options
author | Torben Hohn <torbenh@gmx.de> | 2011-01-25 18:07:35 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-25 19:50:06 -0500 |
commit | ac751efa6a0d70f2c9daef5c7e3a92270f5c2dff (patch) | |
tree | e2d3f799e20e2cbca80891ea17af7484f21d628f /drivers/video/nvidia | |
parent | 3689456b4bd36027022b3215eb2acba51cd0e6b5 (diff) |
console: rename acquire/release_console_sem() to console_lock/unlock()
The -rt patches change the console_semaphore to console_mutex. As a
result, a quite large chunk of the patches changes all
acquire/release_console_sem() to acquire/release_console_mutex()
This commit makes things use more neutral function names which dont make
implications about the underlying lock.
The only real change is the return value of console_trylock which is
inverted from try_acquire_console_sem()
This patch also paves the way to switching console_sem from a semaphore to
a mutex.
[akpm@linux-foundation.org: coding-style fixes]
[akpm@linux-foundation.org: make console_trylock return 1 on success, per Geert]
Signed-off-by: Torben Hohn <torbenh@gmx.de>
Cc: Thomas Gleixner <tglx@tglx.de>
Cc: Greg KH <gregkh@suse.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/nvidia')
-rw-r--r-- | drivers/video/nvidia/nvidia.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c index efe10ff86d63..081dc4745274 100644 --- a/drivers/video/nvidia/nvidia.c +++ b/drivers/video/nvidia/nvidia.c | |||
@@ -1057,7 +1057,7 @@ static int nvidiafb_suspend(struct pci_dev *dev, pm_message_t mesg) | |||
1057 | 1057 | ||
1058 | if (mesg.event == PM_EVENT_PRETHAW) | 1058 | if (mesg.event == PM_EVENT_PRETHAW) |
1059 | mesg.event = PM_EVENT_FREEZE; | 1059 | mesg.event = PM_EVENT_FREEZE; |
1060 | acquire_console_sem(); | 1060 | console_lock(); |
1061 | par->pm_state = mesg.event; | 1061 | par->pm_state = mesg.event; |
1062 | 1062 | ||
1063 | if (mesg.event & PM_EVENT_SLEEP) { | 1063 | if (mesg.event & PM_EVENT_SLEEP) { |
@@ -1070,7 +1070,7 @@ static int nvidiafb_suspend(struct pci_dev *dev, pm_message_t mesg) | |||
1070 | } | 1070 | } |
1071 | dev->dev.power.power_state = mesg; | 1071 | dev->dev.power.power_state = mesg; |
1072 | 1072 | ||
1073 | release_console_sem(); | 1073 | console_unlock(); |
1074 | return 0; | 1074 | return 0; |
1075 | } | 1075 | } |
1076 | 1076 | ||
@@ -1079,7 +1079,7 @@ static int nvidiafb_resume(struct pci_dev *dev) | |||
1079 | struct fb_info *info = pci_get_drvdata(dev); | 1079 | struct fb_info *info = pci_get_drvdata(dev); |
1080 | struct nvidia_par *par = info->par; | 1080 | struct nvidia_par *par = info->par; |
1081 | 1081 | ||
1082 | acquire_console_sem(); | 1082 | console_lock(); |
1083 | pci_set_power_state(dev, PCI_D0); | 1083 | pci_set_power_state(dev, PCI_D0); |
1084 | 1084 | ||
1085 | if (par->pm_state != PM_EVENT_FREEZE) { | 1085 | if (par->pm_state != PM_EVENT_FREEZE) { |
@@ -1097,7 +1097,7 @@ static int nvidiafb_resume(struct pci_dev *dev) | |||
1097 | nvidiafb_blank(FB_BLANK_UNBLANK, info); | 1097 | nvidiafb_blank(FB_BLANK_UNBLANK, info); |
1098 | 1098 | ||
1099 | fail: | 1099 | fail: |
1100 | release_console_sem(); | 1100 | console_unlock(); |
1101 | return 0; | 1101 | return 0; |
1102 | } | 1102 | } |
1103 | #else | 1103 | #else |