diff options
author | Jens Arnold <amiconn@rockbox.org> | 2007-02-18 19:28:29 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2007-02-18 19:28:29 +0000 |
commit | b85e1b92350a225aa848c70246ec5f6eefc93dd0 (patch) | |
tree | 27a18e3dcc9b4ff4f05893ac433e4b3ab831b604 /firmware | |
parent | 7c55b67cf4a9059b725021db032e277b74784377 (diff) | |
download | rockbox-b85e1b92350a225aa848c70246ec5f6eefc93dd0.tar.gz rockbox-b85e1b92350a225aa848c70246ec5f6eefc93dd0.zip |
Tiny size optimisation.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12396 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/drivers/ata.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c index 54a1b12143..21376ab9a7 100644 --- a/firmware/drivers/ata.c +++ b/firmware/drivers/ata.c | |||
@@ -845,7 +845,7 @@ static int set_multiple_mode(int sectors) | |||
845 | 845 | ||
846 | static int set_features(void) | 846 | static int set_features(void) |
847 | { | 847 | { |
848 | struct { | 848 | static struct { |
849 | unsigned char id_word; | 849 | unsigned char id_word; |
850 | unsigned char id_bit; | 850 | unsigned char id_bit; |
851 | unsigned char subcommand; | 851 | unsigned char subcommand; |
@@ -855,7 +855,6 @@ static int set_features(void) | |||
855 | { 83, 9, 0x42, 0x80 }, /* acoustic management: lowest noise */ | 855 | { 83, 9, 0x42, 0x80 }, /* acoustic management: lowest noise */ |
856 | { 82, 6, 0xaa, 0 }, /* enable read look-ahead */ | 856 | { 82, 6, 0xaa, 0 }, /* enable read look-ahead */ |
857 | { 83, 14, 0x03, 0 }, /* force PIO mode */ | 857 | { 83, 14, 0x03, 0 }, /* force PIO mode */ |
858 | { 0, 0, 0, 0 } /* <end of list> */ | ||
859 | }; | 858 | }; |
860 | int i; | 859 | int i; |
861 | int pio_mode = 2; | 860 | int pio_mode = 2; |
@@ -877,7 +876,7 @@ static int set_features(void) | |||
877 | return -1; | 876 | return -1; |
878 | } | 877 | } |
879 | 878 | ||
880 | for (i=0; features[i].id_word; i++) { | 879 | for (i=0; i < (int)(sizeof(features)/sizeof(features[0])); i++) { |
881 | if (identify_info[features[i].id_word] & (1 << features[i].id_bit)) { | 880 | if (identify_info[features[i].id_word] & (1 << features[i].id_bit)) { |
882 | SET_REG(ATA_FEATURE, features[i].subcommand); | 881 | SET_REG(ATA_FEATURE, features[i].subcommand); |
883 | SET_REG(ATA_NSECTOR, features[i].parameter); | 882 | SET_REG(ATA_NSECTOR, features[i].parameter); |