diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-08-07 04:55:03 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-08-07 04:55:03 -0400 |
commit | 4fb8af10d0fd09372d52966b76922b9e82bbc950 (patch) | |
tree | d240e4d40357583e3f3eb228dccf20122a5b31ed /drivers/video/arkfb.c | |
parent | f44f82e8a20b98558486eb14497b2f71c78fa325 (diff) | |
parent | 64a99d2a8c3ed5c4e39f3ae1cc682aa8fd3977fc (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes
Diffstat (limited to 'drivers/video/arkfb.c')
-rw-r--r-- | drivers/video/arkfb.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/drivers/video/arkfb.c b/drivers/video/arkfb.c index 5001bd4ef466..4bd569e479a7 100644 --- a/drivers/video/arkfb.c +++ b/drivers/video/arkfb.c | |||
@@ -958,20 +958,20 @@ static int __devinit ark_pci_probe(struct pci_dev *dev, const struct pci_device_ | |||
958 | /* Prepare PCI device */ | 958 | /* Prepare PCI device */ |
959 | rc = pci_enable_device(dev); | 959 | rc = pci_enable_device(dev); |
960 | if (rc < 0) { | 960 | if (rc < 0) { |
961 | dev_err(info->dev, "cannot enable PCI device\n"); | 961 | dev_err(info->device, "cannot enable PCI device\n"); |
962 | goto err_enable_device; | 962 | goto err_enable_device; |
963 | } | 963 | } |
964 | 964 | ||
965 | rc = pci_request_regions(dev, "arkfb"); | 965 | rc = pci_request_regions(dev, "arkfb"); |
966 | if (rc < 0) { | 966 | if (rc < 0) { |
967 | dev_err(info->dev, "cannot reserve framebuffer region\n"); | 967 | dev_err(info->device, "cannot reserve framebuffer region\n"); |
968 | goto err_request_regions; | 968 | goto err_request_regions; |
969 | } | 969 | } |
970 | 970 | ||
971 | par->dac = ics5342_init(ark_dac_read_regs, ark_dac_write_regs, info); | 971 | par->dac = ics5342_init(ark_dac_read_regs, ark_dac_write_regs, info); |
972 | if (! par->dac) { | 972 | if (! par->dac) { |
973 | rc = -ENOMEM; | 973 | rc = -ENOMEM; |
974 | dev_err(info->dev, "RAMDAC initialization failed\n"); | 974 | dev_err(info->device, "RAMDAC initialization failed\n"); |
975 | goto err_dac; | 975 | goto err_dac; |
976 | } | 976 | } |
977 | 977 | ||
@@ -982,7 +982,7 @@ static int __devinit ark_pci_probe(struct pci_dev *dev, const struct pci_device_ | |||
982 | info->screen_base = pci_iomap(dev, 0, 0); | 982 | info->screen_base = pci_iomap(dev, 0, 0); |
983 | if (! info->screen_base) { | 983 | if (! info->screen_base) { |
984 | rc = -ENOMEM; | 984 | rc = -ENOMEM; |
985 | dev_err(info->dev, "iomap for framebuffer failed\n"); | 985 | dev_err(info->device, "iomap for framebuffer failed\n"); |
986 | goto err_iomap; | 986 | goto err_iomap; |
987 | } | 987 | } |
988 | 988 | ||
@@ -1004,19 +1004,19 @@ static int __devinit ark_pci_probe(struct pci_dev *dev, const struct pci_device_ | |||
1004 | rc = fb_find_mode(&(info->var), info, mode_option, NULL, 0, NULL, 8); | 1004 | rc = fb_find_mode(&(info->var), info, mode_option, NULL, 0, NULL, 8); |
1005 | if (! ((rc == 1) || (rc == 2))) { | 1005 | if (! ((rc == 1) || (rc == 2))) { |
1006 | rc = -EINVAL; | 1006 | rc = -EINVAL; |
1007 | dev_err(info->dev, "mode %s not found\n", mode_option); | 1007 | dev_err(info->device, "mode %s not found\n", mode_option); |
1008 | goto err_find_mode; | 1008 | goto err_find_mode; |
1009 | } | 1009 | } |
1010 | 1010 | ||
1011 | rc = fb_alloc_cmap(&info->cmap, 256, 0); | 1011 | rc = fb_alloc_cmap(&info->cmap, 256, 0); |
1012 | if (rc < 0) { | 1012 | if (rc < 0) { |
1013 | dev_err(info->dev, "cannot allocate colormap\n"); | 1013 | dev_err(info->device, "cannot allocate colormap\n"); |
1014 | goto err_alloc_cmap; | 1014 | goto err_alloc_cmap; |
1015 | } | 1015 | } |
1016 | 1016 | ||
1017 | rc = register_framebuffer(info); | 1017 | rc = register_framebuffer(info); |
1018 | if (rc < 0) { | 1018 | if (rc < 0) { |
1019 | dev_err(info->dev, "cannot register framebugger\n"); | 1019 | dev_err(info->device, "cannot register framebugger\n"); |
1020 | goto err_reg_fb; | 1020 | goto err_reg_fb; |
1021 | } | 1021 | } |
1022 | 1022 | ||
@@ -1090,7 +1090,7 @@ static int ark_pci_suspend (struct pci_dev* dev, pm_message_t state) | |||
1090 | struct fb_info *info = pci_get_drvdata(dev); | 1090 | struct fb_info *info = pci_get_drvdata(dev); |
1091 | struct arkfb_info *par = info->par; | 1091 | struct arkfb_info *par = info->par; |
1092 | 1092 | ||
1093 | dev_info(info->dev, "suspend\n"); | 1093 | dev_info(info->device, "suspend\n"); |
1094 | 1094 | ||
1095 | acquire_console_sem(); | 1095 | acquire_console_sem(); |
1096 | mutex_lock(&(par->open_lock)); | 1096 | mutex_lock(&(par->open_lock)); |
@@ -1121,16 +1121,13 @@ static int ark_pci_resume (struct pci_dev* dev) | |||
1121 | struct fb_info *info = pci_get_drvdata(dev); | 1121 | struct fb_info *info = pci_get_drvdata(dev); |
1122 | struct arkfb_info *par = info->par; | 1122 | struct arkfb_info *par = info->par; |
1123 | 1123 | ||
1124 | dev_info(info->dev, "resume\n"); | 1124 | dev_info(info->device, "resume\n"); |
1125 | 1125 | ||
1126 | acquire_console_sem(); | 1126 | acquire_console_sem(); |
1127 | mutex_lock(&(par->open_lock)); | 1127 | mutex_lock(&(par->open_lock)); |
1128 | 1128 | ||
1129 | if (par->ref_count == 0) { | 1129 | if (par->ref_count == 0) |
1130 | mutex_unlock(&(par->open_lock)); | 1130 | goto fail; |
1131 | release_console_sem(); | ||
1132 | return 0; | ||
1133 | } | ||
1134 | 1131 | ||
1135 | pci_set_power_state(dev, PCI_D0); | 1132 | pci_set_power_state(dev, PCI_D0); |
1136 | pci_restore_state(dev); | 1133 | pci_restore_state(dev); |
@@ -1143,8 +1140,8 @@ static int ark_pci_resume (struct pci_dev* dev) | |||
1143 | arkfb_set_par(info); | 1140 | arkfb_set_par(info); |
1144 | fb_set_suspend(info, 0); | 1141 | fb_set_suspend(info, 0); |
1145 | 1142 | ||
1146 | mutex_unlock(&(par->open_lock)); | ||
1147 | fail: | 1143 | fail: |
1144 | mutex_unlock(&(par->open_lock)); | ||
1148 | release_console_sem(); | 1145 | release_console_sem(); |
1149 | return 0; | 1146 | return 0; |
1150 | } | 1147 | } |