projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'for-3.11/drivers' of git://git.kernel.dk/linux-block
[cascardo/linux.git]
/
net
/
tipc
/
eth_media.c
diff --git
a/net/tipc/eth_media.c
b/net/tipc/eth_media.c
index
120a676
..
40ea40c
100644
(file)
--- a/
net/tipc/eth_media.c
+++ b/
net/tipc/eth_media.c
@@
-62,7
+62,7
@@
static struct eth_bearer eth_bearers[MAX_ETH_BEARERS];
static int eth_started;
static int recv_notification(struct notifier_block *nb, unsigned long evt,
static int eth_started;
static int recv_notification(struct notifier_block *nb, unsigned long evt,
-
void *dv);
+ void *dv);
/*
* Network device notifier info
*/
/*
* Network device notifier info
*/
@@
-162,8
+162,7
@@
static void setup_bearer(struct work_struct *work)
*/
static int enable_bearer(struct tipc_bearer *tb_ptr)
{
*/
static int enable_bearer(struct tipc_bearer *tb_ptr)
{
- struct net_device *dev = NULL;
- struct net_device *pdev = NULL;
+ struct net_device *dev;
struct eth_bearer *eb_ptr = ð_bearers[0];
struct eth_bearer *stop = ð_bearers[MAX_ETH_BEARERS];
char *driver_name = strchr((const char *)tb_ptr->name, ':') + 1;
struct eth_bearer *eb_ptr = ð_bearers[0];
struct eth_bearer *stop = ð_bearers[MAX_ETH_BEARERS];
char *driver_name = strchr((const char *)tb_ptr->name, ':') + 1;
@@
-178,15
+177,7
@@
static int enable_bearer(struct tipc_bearer *tb_ptr)
}
/* Find device with specified name */
}
/* Find device with specified name */
- read_lock(&dev_base_lock);
- for_each_netdev(&init_net, pdev) {
- if (!strncmp(pdev->name, driver_name, IFNAMSIZ)) {
- dev = pdev;
- dev_hold(dev);
- break;
- }
- }
- read_unlock(&dev_base_lock);
+ dev = dev_get_by_name(&init_net, driver_name);
if (!dev)
return -ENODEV;
if (!dev)
return -ENODEV;
@@
-251,9
+242,9
@@
static void disable_bearer(struct tipc_bearer *tb_ptr)
* specified device.
*/
static int recv_notification(struct notifier_block *nb, unsigned long evt,
* specified device.
*/
static int recv_notification(struct notifier_block *nb, unsigned long evt,
- void *
dv
)
+ void *
ptr
)
{
{
- struct net_device *dev =
(struct net_device *)dv
;
+ struct net_device *dev =
netdev_notifier_info_to_dev(ptr)
;
struct eth_bearer *eb_ptr = ð_bearers[0];
struct eth_bearer *stop = ð_bearers[MAX_ETH_BEARERS];
struct eth_bearer *eb_ptr = ð_bearers[0];
struct eth_bearer *stop = ð_bearers[MAX_ETH_BEARERS];