ppp: define reusable device creation functions
authorGuillaume Nault <g.nault@alphalink.fr>
Thu, 28 Apr 2016 15:55:28 +0000 (17:55 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 29 Apr 2016 20:09:44 +0000 (16:09 -0400)
commit7d9f0b48746d37e4381efc02da27535a0a1bac43
tree088b165870ef000dd9e77c5d42f48bf58b38decd
parentac1f74a7fc197660f26b59395b3fd2468f59f5dc
ppp: define reusable device creation functions

Move PPP device initialisation and registration out of
ppp_create_interface().
This prepares code for device registration with rtnetlink.

While there, simplify the prototype of ppp_create_interface():

  * Since ppp_dev_configure() takes care of setting file->private_data,
    there's no need to return a ppp structure to ppp_unattached_ioctl()
    anymore.

  * The unit parameter is made read/write so that ppp_create_interface()
    can tell which unit number has been assigned.

Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ppp/ppp_generic.c