aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorSamuel Iglesias Gonsalvez <siglesias@igalia.com>2012-05-18 05:10:07 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-18 20:38:17 -0400
commitc63a7dd0e5be722095d93e45cd2cad8bf1a68c7f (patch)
tree7134bdf300f3d4e63fc0f6993f613721554b3a22 /drivers/staging
parent611b564d196f8f6b90e0d8808be44eb5e18db9a2 (diff)
Staging: ipack/bridges/tpci200: remove TPCI200_SHORTNAME constant
Removed TPCI200_SHORTNAME. For the pr_* the name of the module is already included due to pr_fmt declaration. In other cases, KBUILD_MODNAME is used instead. Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/ipack/bridges/tpci200.c70
-rw-r--r--drivers/staging/ipack/bridges/tpci200.h2
2 files changed, 33 insertions, 39 deletions
diff --git a/drivers/staging/ipack/bridges/tpci200.c b/drivers/staging/ipack/bridges/tpci200.c
index b460587d4d7..c043345ef60 100644
--- a/drivers/staging/ipack/bridges/tpci200.c
+++ b/drivers/staging/ipack/bridges/tpci200.c
@@ -54,16 +54,15 @@ static struct tpci200_board *check_slot(struct ipack_device *dev)
54 } 54 }
55 55
56 if (dev->slot >= TPCI200_NB_SLOT) { 56 if (dev->slot >= TPCI200_NB_SLOT) {
57 pr_info("Slot [%s %d:%d] doesn't exist! Last tpci200 slot is %d.\n", 57 pr_info("Slot [%d:%d] doesn't exist! Last tpci200 slot is %d.\n",
58 TPCI200_SHORTNAME, dev->bus_nr, dev->slot, 58 dev->bus_nr, dev->slot, TPCI200_NB_SLOT-1);
59 TPCI200_NB_SLOT-1);
60 return NULL; 59 return NULL;
61 } 60 }
62 61
63 BUG_ON(tpci200->slots == NULL); 62 BUG_ON(tpci200->slots == NULL);
64 if (tpci200->slots[dev->slot].dev == NULL) { 63 if (tpci200->slots[dev->slot].dev == NULL) {
65 pr_info("Slot [%s %d:%d] is not registered !\n", 64 pr_info("Slot [%d:%d] is not registered !\n", dev->bus_nr,
66 TPCI200_SHORTNAME, dev->bus_nr, dev->slot); 65 dev->slot);
67 return NULL; 66 return NULL;
68 } 67 }
69 68
@@ -124,8 +123,8 @@ static struct ipack_addr_space *get_slot_address_space(struct ipack_device *dev,
124 addr = &dev->mem_space; 123 addr = &dev->mem_space;
125 break; 124 break;
126 default: 125 default:
127 pr_err("Slot [%s %d:%d] space number %d doesn't exist !\n", 126 pr_err("Slot [%d:%d] space number %d doesn't exist !\n",
128 TPCI200_SHORTNAME, dev->bus_nr, dev->slot, space); 127 dev->bus_nr, dev->slot, space);
129 return NULL; 128 return NULL;
130 break; 129 break;
131 } 130 }
@@ -350,8 +349,7 @@ static irqreturn_t tpci200_interrupt(int irq, void *dev_id)
350 if (unhandled_ints) { 349 if (unhandled_ints) {
351 for (i = 0; i < TPCI200_NB_SLOT; i++) { 350 for (i = 0; i < TPCI200_NB_SLOT; i++) {
352 if (unhandled_ints & ((TPCI200_INT0_EN | TPCI200_INT1_EN) << (2*i))) { 351 if (unhandled_ints & ((TPCI200_INT0_EN | TPCI200_INT1_EN) << (2*i))) {
353 pr_info("No registered ISR for slot [%s %d:%d]!. IRQ will be disabled.\n", 352 pr_info("No registered ISR for slot [%d:%d]!. IRQ will be disabled.\n",
354 TPCI200_SHORTNAME,
355 tpci200->number, i); 353 tpci200->number, i);
356 reg_value = readw( 354 reg_value = readw(
357 (void __iomem *)(tpci200->info->interface_regs + 355 (void __iomem *)(tpci200->info->interface_regs +
@@ -391,8 +389,8 @@ static struct ipack_device *tpci200_slot_register(unsigned int tpci200_number,
391 } 389 }
392 390
393 if (slot_position >= TPCI200_NB_SLOT) { 391 if (slot_position >= TPCI200_NB_SLOT) {
394 pr_info("Slot [%s %d:%d] doesn't exist!\n", 392 pr_info("Slot [%d:%d] doesn't exist!\n", tpci200_number,
395 TPCI200_SHORTNAME, tpci200_number, slot_position); 393 slot_position);
396 return NULL; 394 return NULL;
397 } 395 }
398 396
@@ -400,8 +398,8 @@ static struct ipack_device *tpci200_slot_register(unsigned int tpci200_number,
400 return NULL; 398 return NULL;
401 399
402 if (tpci200->slots[slot_position].dev != NULL) { 400 if (tpci200->slots[slot_position].dev != NULL) {
403 pr_err("Slot [%s %d:%d] already installed !\n", 401 pr_err("Slot [%d:%d] already installed !\n", tpci200_number,
404 TPCI200_SHORTNAME, tpci200_number, slot_position); 402 slot_position);
405 goto err_unlock; 403 goto err_unlock;
406 } 404 }
407 405
@@ -668,7 +666,7 @@ static int tpci200_register(struct tpci200_board *tpci200)
668 666
669 res = request_irq(tpci200->info->pdev->irq, 667 res = request_irq(tpci200->info->pdev->irq,
670 tpci200_interrupt, IRQF_SHARED, 668 tpci200_interrupt, IRQF_SHARED,
671 TPCI200_SHORTNAME, (void *) tpci200); 669 KBUILD_MODNAME, (void *) tpci200);
672 if (res) { 670 if (res) {
673 pr_err("(bn 0x%X, sn 0x%X) unable to register IRQ !", 671 pr_err("(bn 0x%X, sn 0x%X) unable to register IRQ !",
674 tpci200->info->pdev->bus->number, 672 tpci200->info->pdev->bus->number,
@@ -783,31 +781,31 @@ static int tpci200_slot_unmap_space(struct ipack_device *dev, int space)
783 switch (space) { 781 switch (space) {
784 case IPACK_IO_SPACE: 782 case IPACK_IO_SPACE:
785 if (dev->io_space.address == NULL) { 783 if (dev->io_space.address == NULL) {
786 pr_info("Slot [%s %d:%d] IO space not mapped !\n", 784 pr_info("Slot [%d:%d] IO space not mapped !\n",
787 TPCI200_SHORTNAME, dev->bus_nr, dev->slot); 785 dev->bus_nr, dev->slot);
788 goto out_unlock; 786 goto out_unlock;
789 } 787 }
790 virt_addr_space = &dev->io_space; 788 virt_addr_space = &dev->io_space;
791 break; 789 break;
792 case IPACK_ID_SPACE: 790 case IPACK_ID_SPACE:
793 if (dev->id_space.address == NULL) { 791 if (dev->id_space.address == NULL) {
794 pr_info("Slot [%s %d:%d] ID space not mapped !\n", 792 pr_info("Slot [%d:%d] ID space not mapped !\n",
795 TPCI200_SHORTNAME, dev->bus_nr, dev->slot); 793 dev->bus_nr, dev->slot);
796 goto out_unlock; 794 goto out_unlock;
797 } 795 }
798 virt_addr_space = &dev->id_space; 796 virt_addr_space = &dev->id_space;
799 break; 797 break;
800 case IPACK_MEM_SPACE: 798 case IPACK_MEM_SPACE:
801 if (dev->mem_space.address == NULL) { 799 if (dev->mem_space.address == NULL) {
802 pr_info("Slot [%s %d:%d] MEM space not mapped !\n", 800 pr_info("Slot [%d:%d] MEM space not mapped !\n",
803 TPCI200_SHORTNAME, dev->bus_nr, dev->slot); 801 dev->bus_nr, dev->slot);
804 goto out_unlock; 802 goto out_unlock;
805 } 803 }
806 virt_addr_space = &dev->mem_space; 804 virt_addr_space = &dev->mem_space;
807 break; 805 break;
808 default: 806 default:
809 pr_err("Slot [%s %d:%d] space number %d doesn't exist !\n", 807 pr_err("Slot [%d:%d] space number %d doesn't exist !\n",
810 TPCI200_SHORTNAME, dev->bus_nr, dev->slot, space); 808 dev->bus_nr, dev->slot, space);
811 res = -EINVAL; 809 res = -EINVAL;
812 goto out_unlock; 810 goto out_unlock;
813 break; 811 break;
@@ -869,8 +867,8 @@ static int tpci200_slot_map_space(struct ipack_device *dev,
869 switch (space) { 867 switch (space) {
870 case IPACK_IO_SPACE: 868 case IPACK_IO_SPACE:
871 if (dev->io_space.address != NULL) { 869 if (dev->io_space.address != NULL) {
872 pr_err("Slot [%s %d:%d] IO space already mapped !\n", 870 pr_err("Slot [%d:%d] IO space already mapped !\n",
873 TPCI200_SHORTNAME, tpci200->number, dev->slot); 871 tpci200->number, dev->slot);
874 res = -EINVAL; 872 res = -EINVAL;
875 goto out_unlock; 873 goto out_unlock;
876 } 874 }
@@ -881,8 +879,8 @@ static int tpci200_slot_map_space(struct ipack_device *dev,
881 break; 879 break;
882 case IPACK_ID_SPACE: 880 case IPACK_ID_SPACE:
883 if (dev->id_space.address != NULL) { 881 if (dev->id_space.address != NULL) {
884 pr_err("Slot [%s %d:%d] ID space already mapped !\n", 882 pr_err("Slot [%d:%d] ID space already mapped !\n",
885 TPCI200_SHORTNAME, tpci200->number, dev->slot); 883 tpci200->number, dev->slot);
886 res = -EINVAL; 884 res = -EINVAL;
887 goto out_unlock; 885 goto out_unlock;
888 } 886 }
@@ -893,8 +891,7 @@ static int tpci200_slot_map_space(struct ipack_device *dev,
893 break; 891 break;
894 case IPACK_MEM_SPACE: 892 case IPACK_MEM_SPACE:
895 if (dev->mem_space.address != NULL) { 893 if (dev->mem_space.address != NULL) {
896 pr_err("Slot [%s %d:%d] MEM space already mapped !\n", 894 pr_err("Slot [%d:%d] MEM space already mapped !\n",
897 TPCI200_SHORTNAME,
898 tpci200->number, dev->slot); 895 tpci200->number, dev->slot);
899 res = -EINVAL; 896 res = -EINVAL;
900 goto out_unlock; 897 goto out_unlock;
@@ -902,9 +899,9 @@ static int tpci200_slot_map_space(struct ipack_device *dev,
902 virt_addr_space = &dev->mem_space; 899 virt_addr_space = &dev->mem_space;
903 900
904 if (memory_size > tpci200->slots[dev->slot].mem_phys.size) { 901 if (memory_size > tpci200->slots[dev->slot].mem_phys.size) {
905 pr_err("Slot [%s %d:%d] request is 0x%X memory, only 0x%X available !\n", 902 pr_err("Slot [%d:%d] request is 0x%X memory, only 0x%X available !\n",
906 TPCI200_SHORTNAME, dev->bus_nr, dev->slot, 903 dev->bus_nr, dev->slot, memory_size,
907 memory_size, tpci200->slots[dev->slot].mem_phys.size); 904 tpci200->slots[dev->slot].mem_phys.size);
908 res = -EINVAL; 905 res = -EINVAL;
909 goto out_unlock; 906 goto out_unlock;
910 } 907 }
@@ -913,8 +910,7 @@ static int tpci200_slot_map_space(struct ipack_device *dev,
913 size_to_map = memory_size; 910 size_to_map = memory_size;
914 break; 911 break;
915 default: 912 default:
916 pr_err("Slot [%s %d:%d] space %d doesn't exist !\n", 913 pr_err("Slot [%d:%d] space %d doesn't exist !\n",
917 TPCI200_SHORTNAME,
918 tpci200->number, dev->slot, space); 914 tpci200->number, dev->slot, space);
919 res = -EINVAL; 915 res = -EINVAL;
920 goto out_unlock; 916 goto out_unlock;
@@ -950,16 +946,16 @@ static int tpci200_request_irq(struct ipack_device *dev, int vector,
950 } 946 }
951 947
952 if (tpci200->slots[dev->slot].irq != NULL) { 948 if (tpci200->slots[dev->slot].irq != NULL) {
953 pr_err("Slot [%s %d:%d] IRQ already registered !\n", 949 pr_err("Slot [%d:%d] IRQ already registered !\n", dev->bus_nr,
954 TPCI200_SHORTNAME, dev->bus_nr, dev->slot); 950 dev->slot);
955 res = -EINVAL; 951 res = -EINVAL;
956 goto out_unlock; 952 goto out_unlock;
957 } 953 }
958 954
959 slot_irq = kzalloc(sizeof(struct slot_irq), GFP_KERNEL); 955 slot_irq = kzalloc(sizeof(struct slot_irq), GFP_KERNEL);
960 if (slot_irq == NULL) { 956 if (slot_irq == NULL) {
961 pr_err("Slot [%s %d:%d] unable to allocate memory for IRQ !\n", 957 pr_err("Slot [%d:%d] unable to allocate memory for IRQ !\n",
962 TPCI200_SHORTNAME, dev->bus_nr, dev->slot); 958 dev->bus_nr, dev->slot);
963 res = -ENOMEM; 959 res = -ENOMEM;
964 goto out_unlock; 960 goto out_unlock;
965 } 961 }
diff --git a/drivers/staging/ipack/bridges/tpci200.h b/drivers/staging/ipack/bridges/tpci200.h
index 7eb994d127c..0b547eedddc 100644
--- a/drivers/staging/ipack/bridges/tpci200.h
+++ b/drivers/staging/ipack/bridges/tpci200.h
@@ -24,8 +24,6 @@
24 24
25#include "../ipack.h" 25#include "../ipack.h"
26 26
27#define TPCI200_SHORTNAME "TPCI200"
28
29#define TPCI200_NB_SLOT 0x4 27#define TPCI200_NB_SLOT 0x4
30#define TPCI200_NB_BAR 0x6 28#define TPCI200_NB_BAR 0x6
31 29