Removed whitespace.

This commit is contained in:
Florian Pose 2012-07-09 10:05:32 +02:00
parent db5a33956d
commit 5c48b73793
1 changed files with 16 additions and 16 deletions

View File

@ -1,6 +1,6 @@
/******************************************************************************
*
* $Id$
* $Id: module.c,v 366de1369558 2011/07/25 08:29:48 fp $
*
* Copyright (C) 2006-2008 Florian Pose, Ingenieurgemeinschaft IgH
*
@ -127,7 +127,7 @@ int __init ec_init_module(void)
ret = ec_mac_parse(macs[i][0], main_devices[i], 0);
if (ret)
goto out_class;
if (i < backup_count) {
ret = ec_mac_parse(macs[i][1], backup_devices[i], 1);
if (ret)
@ -137,7 +137,7 @@ int __init ec_init_module(void)
// initialize static master variables
ec_master_init_static();
if (master_count) {
if (!(masters = kmalloc(sizeof(ec_master_t) * master_count,
GFP_KERNEL))) {
@ -147,14 +147,14 @@ int __init ec_init_module(void)
goto out_class;
}
}
for (i = 0; i < master_count; i++) {
ret = ec_master_init(&masters[i], i, macs[i][0], macs[i][1],
device_number, class, debug_level);
if (ret)
goto out_free_masters;
}
EC_INFO("%u master%s waiting for devices.\n",
master_count, (master_count == 1 ? "" : "s"));
return ret;
@ -188,12 +188,12 @@ void __exit ec_cleanup_module(void)
if (master_count)
kfree(masters);
class_destroy(class);
if (master_count)
unregister_chrdev_region(device_number, master_count);
EC_INFO("Master module cleaned up.\n");
}
@ -219,14 +219,14 @@ int ec_mac_equal(
)
{
unsigned int i;
for (i = 0; i < ETH_ALEN; i++)
if (mac1[i] != mac2[i])
return 0;
return 1;
}
/*****************************************************************************/
/** Print a MAC address to a buffer.
@ -240,7 +240,7 @@ ssize_t ec_mac_print(
{
off_t off = 0;
unsigned int i;
for (i = 0; i < ETH_ALEN; i++) {
off += sprintf(buffer + off, "%02X", mac[i]);
if (i < ETH_ALEN - 1) off += sprintf(buffer + off, ":");
@ -259,7 +259,7 @@ int ec_mac_is_zero(
)
{
unsigned int i;
for (i = 0; i < ETH_ALEN; i++)
if (mac[i])
return 0;
@ -277,7 +277,7 @@ int ec_mac_is_broadcast(
)
{
unsigned int i;
for (i = 0; i < ETH_ALEN; i++)
if (mac[i] != 0xff)
return 0;
@ -473,7 +473,7 @@ ec_device_t *ecdev_offer(
ec_mutex_unlock(&master->device_mutex);
continue;
}
if (ec_mac_equal(master->main_mac, net_dev->dev_addr)
|| ec_mac_is_broadcast(master->main_mac)) {
ec_mac_print(net_dev->dev_addr, str);
@ -482,7 +482,7 @@ ec_device_t *ecdev_offer(
ec_device_attach(&master->main_device, net_dev, poll, module);
ec_mutex_unlock(&master->device_mutex);
snprintf(net_dev->name, IFNAMSIZ, "ec%u", master->index);
return &master->main_device; // offer accepted
@ -542,7 +542,7 @@ ec_master_t *ecrt_request_master_err(
errptr = ERR_PTR(-EINTR);
goto out_release;
}
if (master->phase != EC_IDLE) {
ec_mutex_unlock(&master->device_mutex);
EC_MASTER_ERR(master, "Master still waiting for devices!\n");