[PATCH] try to keep hd64465 socket driver up to date

Paul Mundt lethal at linux-sh.org
Sat Jul 5 10:28:16 BST 2003


On Sat, Jul 05, 2003 at 12:00:29PM +0200, Dominik Brodowski wrote:
> Even though the hd64465_ss.c driver seems to be very broken [note the
> #error in lines 625-628], try to keep it up to date wrt pcmcia core
> changes in 2.5.

I just noticed this error, it seems this driver doesn't get as much use as it
used to. I'll work on fixing this up shortly. I don't have the hardware for
this though, so it will likely go untested for awhile.

[snip]
> +		ret = pcmcia_register_socket(&hs_sockets[i].socket);
> +		if (ret && i)
> +			pcmcia_unregister_socket(&hs_socket[0].socket);
> +	}
> +
> +    	return 0;
>  }
>  
Typo I presume, since there's no hs_socket[].

>  static void __exit exit_hs(void)
> @@ -1051,16 +985,20 @@
>      	u_long flags;
>  	int i;
>  	
> -	save_and_cli(flags);
> +	for (i=0 ; i<HS_MAX_SOCKETS ; i++)
> +		pcmcia_unregister_socket(&hs_socket[i].socket);
> +
> +	local_irq_save(flags);
>  
Same here.

>      	/*
>  	 * Release kernel resources
>  	 */
>  	for (i=0 ; i<HS_MAX_SOCKETS ; i++)
>  	    hs_exit_socket(&hs_sockets[i]);
> -	platform_device_unregister(&hd64465_device);
>  	
> -	restore_flags(flags);
> +	local_irq_restore(flags);
> +
> +	platform_device_unregister(&hd64465_device);
>  	unregister_driver(&hd64465_driver);
>  }
>  
For this, I've just moved the local_irq_save()/local_irq_restore() into
hs_exit_socket(), as looping over HS_MAX_SOCKETS twice doesn't make much sense.

The rest of this looks good, I'll merge this into LinuxSH CVS.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : http://lists.infradead.org/pipermail/linux-pcmcia/attachments/20030705/9641baf3/attachment.bin


More information about the linux-pcmcia mailing list