[parisc-linux] patch for Dino serial port (again !)

Clement MOYROUD moyroudc@esiee.fr
Tue, 12 Jun 2001 15:30:56 +0000


--'ThIs-RaNdOm-StRiNg-/=_.80630276:
Content-Type: text/plain; charset=iso-8859-1
Content-Length: 790
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0

Hi all !                                                              
                                                                      
Based on Grant's comments (thanks Grant !), I decided to keep the     
method used in my first patch, as the other one was making things more
complicated. So I modified the parts that needed clearing, and I make 
this patch available for you to test before commitment to cvs.        
Don't hesitate to test, as it has only been tested on a B132L+ and a  
B180. Any remarks or suggestions appreciated !                        
                                                                      
Clement MOYROUD                                                       
ESIEE Team                                                            
--'ThIs-RaNdOm-StRiNg-/=_.80630276:
Content-Disposition: attachment;filename=dinors232.patch
Content-Type: application/octet-stream
Content-Length: 4564
Content-Transfer-Encoding: base64
MIME-Version: 1.0

ZGlmZiAtTnJ1IGxpbnV4L2RyaXZlcnMvZ3NjL2Rpbm8uYyBsaW51eC5uZXcvZHJpdmVycy9nc2Mv
ZGluby5jCi0tLSBsaW51eC9kcml2ZXJzL2dzYy9kaW5vLmMJVHVlIEp1biAxMiAxNDo0OTo0MiAy
MDAxCisrKyBsaW51eC5uZXcvZHJpdmVycy9nc2MvZGluby5jCVR1ZSBKdW4gMTIgMTQ6NDk6NTkg
MjAwMQpAQCAtNjYsNiArNjYsNyBAQAogI2luY2x1ZGUgPGFzbS9pcnEuaD4JCS8qIGZvciAiZ3Nj
IiBpcnEgZnVuY3Rpb25zICovCiAjaW5jbHVkZSA8YXNtL2dzYy5oPgogCisjaW5jbHVkZSAiYnVz
ZGV2aWNlLmgiCiAKICN1bmRlZiBESU5PX0RFQlVHCiAKQEAgLTU0Miw2ICs1NDMsMjEgQEAKIAl9
CiB9CiAKK3N0YXRpYyBpbnQKK2Rpbm9fZmluZF9pcnEoc3RydWN0IGJ1c2RldmljZSAqZGlub19k
ZXYsIHN0cnVjdCBocF9kZXZpY2UgKmRldikKK3sJCisgICAgICAgIGludCBp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