EISA: Whitespace cleanup
Remove spaces on empty line and replace spaces with tabs. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Acked-by: Marc Zyngier <maz@misterjones.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Родитель
3a92a661ab
Коммит
91809d22c8
|
@ -75,9 +75,9 @@ static void __init eisa_name_device(struct eisa_device *edev)
|
|||
|
||||
static char __init *decode_eisa_sig(unsigned long addr)
|
||||
{
|
||||
static char sig_str[EISA_SIG_LEN];
|
||||
static char sig_str[EISA_SIG_LEN];
|
||||
u8 sig[4];
|
||||
u16 rev;
|
||||
u16 rev;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
|
@ -97,13 +97,13 @@ static char __init *decode_eisa_sig(unsigned long addr)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
sig_str[0] = ((sig[0] >> 2) & 0x1f) + ('A' - 1);
|
||||
sig_str[1] = (((sig[0] & 3) << 3) | (sig[1] >> 5)) + ('A' - 1);
|
||||
sig_str[2] = (sig[1] & 0x1f) + ('A' - 1);
|
||||
rev = (sig[2] << 8) | sig[3];
|
||||
sprintf(sig_str + 3, "%04X", rev);
|
||||
sig_str[0] = ((sig[0] >> 2) & 0x1f) + ('A' - 1);
|
||||
sig_str[1] = (((sig[0] & 3) << 3) | (sig[1] >> 5)) + ('A' - 1);
|
||||
sig_str[2] = (sig[1] & 0x1f) + ('A' - 1);
|
||||
rev = (sig[2] << 8) | sig[3];
|
||||
sprintf(sig_str + 3, "%04X", rev);
|
||||
|
||||
return sig_str;
|
||||
return sig_str;
|
||||
}
|
||||
|
||||
static int eisa_bus_match(struct device *dev, struct device_driver *drv)
|
||||
|
@ -314,7 +314,7 @@ static void __init eisa_release_resources(struct eisa_device *edev)
|
|||
|
||||
static int __init eisa_probe(struct eisa_root_device *root)
|
||||
{
|
||||
int i, c;
|
||||
int i, c;
|
||||
struct eisa_device *edev;
|
||||
char *enabled_str;
|
||||
|
||||
|
@ -331,7 +331,7 @@ static int __init eisa_probe(struct eisa_root_device *root)
|
|||
|
||||
if (eisa_request_resources(root, edev, 0)) {
|
||||
dev_warn(root->dev,
|
||||
"EISA: Cannot allocate resource for mainboard\n");
|
||||
"EISA: Cannot allocate resource for mainboard\n");
|
||||
kfree(edev);
|
||||
if (!root->force_probe)
|
||||
return -EBUSY;
|
||||
|
@ -350,14 +350,14 @@ static int __init eisa_probe(struct eisa_root_device *root)
|
|||
|
||||
if (eisa_register_device(edev)) {
|
||||
dev_err(&edev->dev, "EISA: Failed to register %s\n",
|
||||
edev->id.sig);
|
||||
edev->id.sig);
|
||||
eisa_release_resources(edev);
|
||||
kfree(edev);
|
||||
}
|
||||
|
||||
force_probe:
|
||||
|
||||
for (c = 0, i = 1; i <= root->slots; i++) {
|
||||
for (c = 0, i = 1; i <= root->slots; i++) {
|
||||
edev = kzalloc(sizeof(*edev), GFP_KERNEL);
|
||||
if (!edev) {
|
||||
dev_err(root->dev, "EISA: Out of memory for slot %d\n",
|
||||
|
@ -367,8 +367,8 @@ static int __init eisa_probe(struct eisa_root_device *root)
|
|||
|
||||
if (eisa_request_resources(root, edev, i)) {
|
||||
dev_warn(root->dev,
|
||||
"Cannot allocate resource for EISA slot %d\n",
|
||||
i);
|
||||
"Cannot allocate resource for EISA slot %d\n",
|
||||
i);
|
||||
kfree(edev);
|
||||
continue;
|
||||
}
|
||||
|
@ -395,11 +395,11 @@ static int __init eisa_probe(struct eisa_root_device *root)
|
|||
|
||||
if (eisa_register_device(edev)) {
|
||||
dev_err(&edev->dev, "EISA: Failed to register %s\n",
|
||||
edev->id.sig);
|
||||
edev->id.sig);
|
||||
eisa_release_resources(edev);
|
||||
kfree(edev);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dev_info(root->dev, "EISA: Detected %d card%s\n", c, c == 1 ? "" : "s");
|
||||
return 0;
|
||||
|
|
|
@ -50,11 +50,11 @@ static int __init pci_eisa_init(struct pci_dev *pdev)
|
|||
return -1;
|
||||
}
|
||||
|
||||
pci_eisa_root.dev = &pdev->dev;
|
||||
pci_eisa_root.res = bus_res;
|
||||
pci_eisa_root.bus_base_addr = bus_res->start;
|
||||
pci_eisa_root.slots = EISA_MAX_SLOTS;
|
||||
pci_eisa_root.dma_mask = pdev->dma_mask;
|
||||
pci_eisa_root.dev = &pdev->dev;
|
||||
pci_eisa_root.res = bus_res;
|
||||
pci_eisa_root.bus_base_addr = bus_res->start;
|
||||
pci_eisa_root.slots = EISA_MAX_SLOTS;
|
||||
pci_eisa_root.dma_mask = pdev->dma_mask;
|
||||
dev_set_drvdata(pci_eisa_root.dev, &pci_eisa_root);
|
||||
|
||||
if (eisa_root_register (&pci_eisa_root)) {
|
||||
|
|
|
@ -35,11 +35,11 @@ static struct platform_device eisa_root_dev = {
|
|||
};
|
||||
|
||||
static struct eisa_root_device eisa_bus_root = {
|
||||
.dev = &eisa_root_dev.dev,
|
||||
.bus_base_addr = 0,
|
||||
.res = &ioport_resource,
|
||||
.slots = EISA_MAX_SLOTS,
|
||||
.dma_mask = 0xffffffff,
|
||||
.dev = &eisa_root_dev.dev,
|
||||
.bus_base_addr = 0,
|
||||
.res = &ioport_resource,
|
||||
.slots = EISA_MAX_SLOTS,
|
||||
.dma_mask = 0xffffffff,
|
||||
};
|
||||
|
||||
static void virtual_eisa_release (struct device *dev)
|
||||
|
@ -51,9 +51,8 @@ static int __init virtual_eisa_root_init (void)
|
|||
{
|
||||
int r;
|
||||
|
||||
if ((r = platform_device_register (&eisa_root_dev))) {
|
||||
return r;
|
||||
}
|
||||
if ((r = platform_device_register (&eisa_root_dev)))
|
||||
return r;
|
||||
|
||||
eisa_bus_root.force_probe = force_probe;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче