Re: [patch 2/5][RFC] Update net core to use devres.

2007-08-03 Thread Brandon Philips
On 18:13 Fri 03 Aug 2007, Tejun Heo wrote: > > + p = devres_alloc(devm_free_netdev, 0, GFP_KERNEL); > > s/0/sizeof(*p)/ Oops! It should have read like this: +static void * register_netdev_devres(struct device *gendev, + struct net_device *dev) +{

Re: [patch 2/5][RFC] Update net core to use devres.

2007-08-03 Thread Tejun Heo
> +static inline void * register_netdev_devres(struct device *gendev, > + struct net_device *dev) > +{ > + struct net_device **p; > + > + /* 0 size because we don't need it. The net_device is already alloc'd > + * in alloc_netdev_mq. We can'

[patch 2/5][RFC] Update net core to use devres.

2007-08-02 Thread Brandon Philips
* netdev_pci_remove_one() can replace simple pci device remove functions * devm_alloc_netdev() is like alloc_netdev but allocates memory using devres. Signed-off-by: Brandon Philips <[EMAIL PROTECTED]> --- include/linux/etherdevice.h |5 ++ include/linux/netdevice.h |7 ++ net/core/