patch-2.3.99-pre4 linux/drivers/usb/serial/ezusb_convert.pl

Next file: linux/drivers/usb/serial/ftdi_sio.c
Previous file: linux/drivers/usb/serial/Makefile
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre3/linux/drivers/usb/serial/ezusb_convert.pl linux/drivers/usb/serial/ezusb_convert.pl
@@ -27,6 +27,8 @@
     push(@records, [$addr, \@bytes]);
 }
 
+@sorted_records = sort { $a->[0] <=> $b->[0] } @records;
+
 print <<"EOF";
 /*
  * ${basename}_fw.h
@@ -39,7 +41,7 @@
 EOF
 
 print "static const struct ezusb_hex_record ${basename}_firmware[] = {\n";
-foreach $r (@records) {
+foreach $r (@sorted_records) {
     printf("{ 0x%04x,\t%d,\t{", $r->[0], scalar(@{$r->[1]}));
     print join(", ", map {sprintf('0x%02x', $_);} @{$r->[1]});
     print "} },\n";

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)