From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Herring Subject: Re: [PATCH] net: add calxeda xgmac ethernet driver Date: Fri, 04 Nov 2011 15:52:01 -0500 Message-ID: <4EB45071.8000406@gmail.com> References: <1319684206-473-1-git-send-email-robherring2@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org To: Grant Likely Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org List-Id: netdev.vger.kernel.org Grant, On 11/04/2011 11:57 AM, Grant Likely wrote: > On Wed, Oct 26, 2011 at 10:56 PM, Rob Herring wrote: >> From: Rob Herring >> >> Add support for the XGMAC 10Gb ethernet device in the Calxeda Highbank >> SOC. >> >> Signed-off-by: Rob Herring > > Sinker question: is this a driver for an entirely new GMAC device > (designed from scratch) or is it based on an existing IP block? > Of course I'd rather use a existing driver. It is a new IP block. >> +/** >> + * xgmac_init - Entry point for the driver >> + * Description: This function is the entry point for the driver. >> + */ >> +static int __init xgmac_init(void) >> +{ >> + return platform_driver_register(&xgmac_driver); >> +} >> +module_init(xgmac_init); >> + >> +/** >> + * xgmac_cleanup_module - Cleanup routine for the driver >> + * Description: This function is the cleanup routine for the driver. >> + */ >> +static void __exit xgmac_exit(void) >> +{ >> + platform_driver_unregister(&xgmac_driver); >> +} >> +module_exit(xgmac_exit); > > You can drop some boilerplate with module_platform_driver() now. Okay. Rob