diff options
author | anish kumar <anish198519851985@gmail.com> | 2011-05-19 11:28:42 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-05-19 18:34:31 -0400 |
commit | 1639c8ab4857f18f59222141777c8db931071785 (patch) | |
tree | 9b4a6b47416ac13651b756078195cecf0e32da41 /drivers/staging/sm7xx/smtcfb.c | |
parent | 2d9903621dbfa6524e7e98fded2fae31ef09f484 (diff) |
Staging: sm7xx: removing extra white spaces,redundant code and using macros
This patch is to remove extra spaces,redundant code and using
ARRAY_SIZE macros.
Signed-off-by: anish kumar <anish198519851985@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/sm7xx/smtcfb.c')
-rw-r--r-- | drivers/staging/sm7xx/smtcfb.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/staging/sm7xx/smtcfb.c b/drivers/staging/sm7xx/smtcfb.c index 94cb4e8dcaf..1aca0cb40ca 100644 --- a/drivers/staging/sm7xx/smtcfb.c +++ b/drivers/staging/sm7xx/smtcfb.c | |||
@@ -128,7 +128,7 @@ u16 smtc_ChipIDs[] = { | |||
128 | 0x720 | 128 | 0x720 |
129 | }; | 129 | }; |
130 | 130 | ||
131 | #define numSMTCchipIDs (sizeof(smtc_ChipIDs) / sizeof(u16)) | 131 | #define numSMTCchipIDs ARRAY_SIZE(smtc_ChipIDs) |
132 | 132 | ||
133 | static struct fb_var_screeninfo smtcfb_var = { | 133 | static struct fb_var_screeninfo smtcfb_var = { |
134 | .xres = 1024, | 134 | .xres = 1024, |
@@ -842,7 +842,7 @@ static int __init sm712vga_setup(char *options) | |||
842 | smdbg("\nsm712vga_setup = %s\n", options); | 842 | smdbg("\nsm712vga_setup = %s\n", options); |
843 | 843 | ||
844 | for (index = 0; | 844 | for (index = 0; |
845 | index < (sizeof(vesa_mode) / sizeof(struct vesa_mode_table)); | 845 | index < ARRAY_SIZE(vesa_mode); |
846 | index++) { | 846 | index++) { |
847 | if (strstr(options, vesa_mode[index].mode_index)) { | 847 | if (strstr(options, vesa_mode[index].mode_index)) { |
848 | smtc_screen_info.lfb_width = vesa_mode[index].lfb_width; | 848 | smtc_screen_info.lfb_width = vesa_mode[index].lfb_width; |
@@ -876,7 +876,6 @@ static int __devinit smtcfb_pci_probe(struct pci_dev *pdev, | |||
876 | err = pci_enable_device(pdev); /* enable SMTC chip */ | 876 | err = pci_enable_device(pdev); /* enable SMTC chip */ |
877 | if (err) | 877 | if (err) |
878 | return err; | 878 | return err; |
879 | err = -ENOMEM; | ||
880 | 879 | ||
881 | hw.chipID = ent->device; | 880 | hw.chipID = ent->device; |
882 | sprintf(name, "sm%Xfb", hw.chipID); | 881 | sprintf(name, "sm%Xfb", hw.chipID); |
@@ -1006,7 +1005,7 @@ static int __devinit smtcfb_pci_probe(struct pci_dev *pdev, | |||
1006 | 1005 | ||
1007 | return 0; | 1006 | return 0; |
1008 | 1007 | ||
1009 | failed: | 1008 | failed: |
1010 | printk(KERN_INFO "Silicon Motion, Inc. primary display init fail\n"); | 1009 | printk(KERN_INFO "Silicon Motion, Inc. primary display init fail\n"); |
1011 | 1010 | ||
1012 | smtc_unmap_smem(sfb); | 1011 | smtc_unmap_smem(sfb); |