[PATCH 0/3] Blackfin EMAC Driver updates for 2.6.27 (v2) - Kernel

This is a discussion on [PATCH 0/3] Blackfin EMAC Driver updates for 2.6.27 (v2) - Kernel ; Hi Jeff, Please ignore the v1 patchset. I messed up something which Mike pointed out. Thanks a lot -Bryan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: [PATCH 0/3] Blackfin EMAC Driver updates for 2.6.27 (v2)

  1. [PATCH 0/3] Blackfin EMAC Driver updates for 2.6.27 (v2)


    Hi Jeff,

    Please ignore the v1 patchset. I messed up something which Mike pointed out.

    Thanks a lot
    -Bryan
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  2. Re: [PATCH 1/3] Blackfin EMAC Driver: add proper __devinit/__devexit markings

    Bryan Wu wrote:
    > From: Mike Frysinger
    >
    > Signed-off-by: Mike Frysinger
    > Signed-off-by: Bryan Wu
    > ---
    > drivers/net/bfin_mac.c | 6 +++---
    > 1 files changed, 3 insertions(+), 3 deletions(-)
    >
    > diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
    > index 4144343..17951cb 100644
    > --- a/drivers/net/bfin_mac.c
    > +++ b/drivers/net/bfin_mac.c
    > @@ -956,7 +956,7 @@ static int bfin_mac_close(struct net_device *dev)
    > return 0;
    > }
    >
    > -static int __init bfin_mac_probe(struct platform_device *pdev)
    > +static int __devinit bfin_mac_probe(struct platform_device *pdev)


    __init was OK here.
    __devinit is for hotplug devices

    > {
    > struct net_device *ndev;
    > struct bfin_mac_local *lp;
    > @@ -1082,7 +1082,7 @@ out_err_probe_mac:
    > return rc;
    > }
    >
    > -static int bfin_mac_remove(struct platform_device *pdev)
    > +static int __devexit bfin_mac_remove(struct platform_device *pdev)


    __devexit is for hotplug, use __exit

    > {
    > struct net_device *ndev = platform_get_drvdata(pdev);
    > struct bfin_mac_local *lp = netdev_priv(ndev);
    > @@ -1129,7 +1129,7 @@ static int bfin_mac_resume(struct platform_device *pdev)
    >
    > static struct platform_driver bfin_mac_driver = {
    > .probe = bfin_mac_probe,


    ..probe shouldn't be declared here. And you should use
    platform_device_probe() instead of platform_device_add()

    > - .remove = bfin_mac_remove,
    > + .remove = __devexit_p(bfin_mac_remove),


    should be __exit_p()

    > .resume = bfin_mac_resume,
    > .suspend = bfin_mac_suspend,
    > .driver = {


    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  3. Re: [PATCH 1/3] Blackfin EMAC Driver: add proper __devinit/__devexit markings

    On Mon, Jul 28, 2008 at 11:21 PM, Paulius Zaleckas
    wrote:
    > Bryan Wu wrote:
    >>
    >> From: Mike Frysinger
    >>
    >> Signed-off-by: Mike Frysinger
    >> Signed-off-by: Bryan Wu
    >> ---
    >> drivers/net/bfin_mac.c | 6 +++---
    >> 1 files changed, 3 insertions(+), 3 deletions(-)
    >>
    >> diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
    >> index 4144343..17951cb 100644
    >> --- a/drivers/net/bfin_mac.c
    >> +++ b/drivers/net/bfin_mac.c
    >> @@ -956,7 +956,7 @@ static int bfin_mac_close(struct net_device *dev)
    >> return 0;
    >> }
    >> -static int __init bfin_mac_probe(struct platform_device *pdev)
    >> +static int __devinit bfin_mac_probe(struct platform_device *pdev)

    >
    > __init was OK here.
    > __devinit is for hotplug devices
    >
    >> {
    >> struct net_device *ndev;
    >> struct bfin_mac_local *lp;
    >> @@ -1082,7 +1082,7 @@ out_err_probe_mac:
    >> return rc;
    >> }
    >> -static int bfin_mac_remove(struct platform_device *pdev)
    >> +static int __devexit bfin_mac_remove(struct platform_device *pdev)

    >
    > __devexit is for hotplug, use __exit
    >
    >> {
    >> struct net_device *ndev = platform_get_drvdata(pdev);
    >> struct bfin_mac_local *lp = netdev_priv(ndev);
    >> @@ -1129,7 +1129,7 @@ static int bfin_mac_resume(struct platform_device
    >> *pdev)
    >> static struct platform_driver bfin_mac_driver = {
    >> .probe = bfin_mac_probe,

    >
    > .probe shouldn't be declared here. And you should use
    > platform_device_probe() instead of platform_device_add()
    >


    I failed to find platform_device_probe. Could you please provide some info?
    ..probe and .remove is very common in platform driver interface, isn't?
    I don't know any difference between platform_device_probe() and
    platform_device_add().

    Thanks
    -Bryan

    >> - .remove = bfin_mac_remove,
    >> + .remove = __devexit_p(bfin_mac_remove),

    >
    > should be __exit_p()
    >
    >> .resume = bfin_mac_resume,
    >> .suspend = bfin_mac_suspend,
    >> .driver = {

    >
    > --
    > To unsubscribe from this list: send the line "unsubscribe netdev" in
    > the body of a message to majordomo@vger.kernel.org
    > More majordomo info at http://vger.kernel.org/majordomo-info.html
    >

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  4. Re: [PATCH 1/3] Blackfin EMAC Driver: add proper __devinit/__devexit markings

    Bryan Wu wrote:
    > From: Mike Frysinger
    >
    > Signed-off-by: Mike Frysinger
    > Signed-off-by: Bryan Wu
    > ---
    > drivers/net/bfin_mac.c | 6 +++---
    > 1 files changed, 3 insertions(+), 3 deletions(-)
    >


    applied 1-3


    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

+ Reply to Thread