aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/ohci1394.c
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2008-03-24 15:52:42 -0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2008-04-18 11:55:31 -0400
commitc4e2e02bc96f0a1605f858df3d6d5ea70fc459fc (patch)
tree2124aa45c5abd01cb12767f5bf19c94327242a44 /drivers/ieee1394/ohci1394.c
parentd09c68038306442e3566366b6988a6dd83481251 (diff)
ieee1394: ohci1394: refactor some printk format strings
to reduce the size of ohci1394.ko. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/ieee1394/ohci1394.c')
-rw-r--r--drivers/ieee1394/ohci1394.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c
index a660222fc532..9e304c3cea22 100644
--- a/drivers/ieee1394/ohci1394.c
+++ b/drivers/ieee1394/ohci1394.c
@@ -149,7 +149,7 @@ printk(level "%s: fw-host%d: " fmt "\n" , OHCI1394_DRIVER_NAME, ohci->host->id ,
149/* Module Parameters */ 149/* Module Parameters */
150static int phys_dma = 1; 150static int phys_dma = 1;
151module_param(phys_dma, int, 0444); 151module_param(phys_dma, int, 0444);
152MODULE_PARM_DESC(phys_dma, "Enable physical dma (default = 1)."); 152MODULE_PARM_DESC(phys_dma, "Enable physical DMA (default = 1).");
153 153
154static void dma_trm_tasklet(unsigned long data); 154static void dma_trm_tasklet(unsigned long data);
155static void dma_trm_reset(struct dma_trm_ctx *d); 155static void dma_trm_reset(struct dma_trm_ctx *d);
@@ -2785,7 +2785,7 @@ alloc_dma_rcv_ctx(struct ti_ohci *ohci, struct dma_rcv_ctx *d,
2785 d->buf_bus = kzalloc(d->num_desc * sizeof(*d->buf_bus), GFP_ATOMIC); 2785 d->buf_bus = kzalloc(d->num_desc * sizeof(*d->buf_bus), GFP_ATOMIC);
2786 2786
2787 if (d->buf_cpu == NULL || d->buf_bus == NULL) { 2787 if (d->buf_cpu == NULL || d->buf_bus == NULL) {
2788 PRINT(KERN_ERR, "Failed to allocate dma buffer"); 2788 PRINT(KERN_ERR, "Failed to allocate %s", "DMA buffer");
2789 free_dma_rcv_ctx(d); 2789 free_dma_rcv_ctx(d);
2790 return -ENOMEM; 2790 return -ENOMEM;
2791 } 2791 }
@@ -2794,7 +2794,7 @@ alloc_dma_rcv_ctx(struct ti_ohci *ohci, struct dma_rcv_ctx *d,
2794 d->prg_bus = kzalloc(d->num_desc * sizeof(*d->prg_bus), GFP_ATOMIC); 2794 d->prg_bus = kzalloc(d->num_desc * sizeof(*d->prg_bus), GFP_ATOMIC);
2795 2795
2796 if (d->prg_cpu == NULL || d->prg_bus == NULL) { 2796 if (d->prg_cpu == NULL || d->prg_bus == NULL) {
2797 PRINT(KERN_ERR, "Failed to allocate dma prg"); 2797 PRINT(KERN_ERR, "Failed to allocate %s", "DMA prg");
2798 free_dma_rcv_ctx(d); 2798 free_dma_rcv_ctx(d);
2799 return -ENOMEM; 2799 return -ENOMEM;
2800 } 2800 }
@@ -2802,7 +2802,7 @@ alloc_dma_rcv_ctx(struct ti_ohci *ohci, struct dma_rcv_ctx *d,
2802 d->spb = kmalloc(d->split_buf_size, GFP_ATOMIC); 2802 d->spb = kmalloc(d->split_buf_size, GFP_ATOMIC);
2803 2803
2804 if (d->spb == NULL) { 2804 if (d->spb == NULL) {
2805 PRINT(KERN_ERR, "Failed to allocate split buffer"); 2805 PRINT(KERN_ERR, "Failed to allocate %s", "split buffer");
2806 free_dma_rcv_ctx(d); 2806 free_dma_rcv_ctx(d);
2807 return -ENOMEM; 2807 return -ENOMEM;
2808 } 2808 }
@@ -2828,7 +2828,7 @@ alloc_dma_rcv_ctx(struct ti_ohci *ohci, struct dma_rcv_ctx *d,
2828 memset(d->buf_cpu[i], 0, d->buf_size); 2828 memset(d->buf_cpu[i], 0, d->buf_size);
2829 } else { 2829 } else {
2830 PRINT(KERN_ERR, 2830 PRINT(KERN_ERR,
2831 "Failed to allocate dma buffer"); 2831 "Failed to allocate %s", "DMA buffer");
2832 free_dma_rcv_ctx(d); 2832 free_dma_rcv_ctx(d);
2833 return -ENOMEM; 2833 return -ENOMEM;
2834 } 2834 }
@@ -2839,7 +2839,7 @@ alloc_dma_rcv_ctx(struct ti_ohci *ohci, struct dma_rcv_ctx *d,
2839 memset(d->prg_cpu[i], 0, sizeof(struct dma_cmd)); 2839 memset(d->prg_cpu[i], 0, sizeof(struct dma_cmd));
2840 } else { 2840 } else {
2841 PRINT(KERN_ERR, 2841 PRINT(KERN_ERR,
2842 "Failed to allocate dma prg"); 2842 "Failed to allocate %s", "DMA prg");
2843 free_dma_rcv_ctx(d); 2843 free_dma_rcv_ctx(d);
2844 return -ENOMEM; 2844 return -ENOMEM;
2845 } 2845 }
@@ -2900,7 +2900,7 @@ alloc_dma_trm_ctx(struct ti_ohci *ohci, struct dma_trm_ctx *d,
2900 d->prg_bus = kzalloc(d->num_desc * sizeof(*d->prg_bus), GFP_KERNEL); 2900 d->prg_bus = kzalloc(d->num_desc * sizeof(*d->prg_bus), GFP_KERNEL);
2901 2901
2902 if (d->prg_cpu == NULL || d->prg_bus == NULL) { 2902 if (d->prg_cpu == NULL || d->prg_bus == NULL) {
2903 PRINT(KERN_ERR, "Failed to allocate at dma prg"); 2903 PRINT(KERN_ERR, "Failed to allocate %s", "AT DMA prg");
2904 free_dma_trm_ctx(d); 2904 free_dma_trm_ctx(d);
2905 return -ENOMEM; 2905 return -ENOMEM;
2906 } 2906 }
@@ -2923,7 +2923,7 @@ alloc_dma_trm_ctx(struct ti_ohci *ohci, struct dma_trm_ctx *d,
2923 memset(d->prg_cpu[i], 0, sizeof(struct at_dma_prg)); 2923 memset(d->prg_cpu[i], 0, sizeof(struct at_dma_prg));
2924 } else { 2924 } else {
2925 PRINT(KERN_ERR, 2925 PRINT(KERN_ERR,
2926 "Failed to allocate at dma prg"); 2926 "Failed to allocate %s", "AT DMA prg");
2927 free_dma_trm_ctx(d); 2927 free_dma_trm_ctx(d);
2928 return -ENOMEM; 2928 return -ENOMEM;
2929 } 2929 }
@@ -3031,7 +3031,7 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev,
3031 3031
3032 host = hpsb_alloc_host(&ohci1394_driver, sizeof(struct ti_ohci), &dev->dev); 3032 host = hpsb_alloc_host(&ohci1394_driver, sizeof(struct ti_ohci), &dev->dev);
3033 if (!host) { 3033 if (!host) {
3034 PRINT_G(KERN_ERR, "Failed to allocate host structure"); 3034 PRINT_G(KERN_ERR, "Failed to allocate %s", "host structure");
3035 goto err; 3035 goto err;
3036 } 3036 }
3037 ohci = host->hostdata; 3037 ohci = host->hostdata;
@@ -3104,7 +3104,7 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev,
3104 pci_alloc_consistent(ohci->dev, OHCI_CONFIG_ROM_LEN, 3104 pci_alloc_consistent(ohci->dev, OHCI_CONFIG_ROM_LEN,
3105 &ohci->csr_config_rom_bus); 3105 &ohci->csr_config_rom_bus);
3106 if (ohci->csr_config_rom_cpu == NULL) { 3106 if (ohci->csr_config_rom_cpu == NULL) {
3107 PRINT_G(KERN_ERR, "Failed to allocate buffer config rom"); 3107 PRINT_G(KERN_ERR, "Failed to allocate %s", "buffer config rom");
3108 goto err; 3108 goto err;
3109 } 3109 }
3110 ohci->init_state = OHCI_INIT_HAVE_CONFIG_ROM_BUFFER; 3110 ohci->init_state = OHCI_INIT_HAVE_CONFIG_ROM_BUFFER;
@@ -3114,7 +3114,7 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev,
3114 pci_alloc_consistent(ohci->dev, OHCI1394_SI_DMA_BUF_SIZE, 3114 pci_alloc_consistent(ohci->dev, OHCI1394_SI_DMA_BUF_SIZE,
3115 &ohci->selfid_buf_bus); 3115 &ohci->selfid_buf_bus);
3116 if (ohci->selfid_buf_cpu == NULL) { 3116 if (ohci->selfid_buf_cpu == NULL) {
3117 PRINT_G(KERN_ERR, "Failed to allocate self-ID buffer"); 3117 PRINT_G(KERN_ERR, "Failed to allocate %s", "self-ID buffer");
3118 goto err; 3118 goto err;
3119 } 3119 }
3120 ohci->init_state = OHCI_INIT_HAVE_SELFID_BUFFER; 3120 ohci->init_state = OHCI_INIT_HAVE_SELFID_BUFFER;
@@ -3133,7 +3133,7 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev,
3133 DMA_CTX_ASYNC_REQ, 0, AR_REQ_NUM_DESC, 3133 DMA_CTX_ASYNC_REQ, 0, AR_REQ_NUM_DESC,
3134 AR_REQ_BUF_SIZE, AR_REQ_SPLIT_BUF_SIZE, 3134 AR_REQ_BUF_SIZE, AR_REQ_SPLIT_BUF_SIZE,
3135 OHCI1394_AsReqRcvContextBase) < 0) { 3135 OHCI1394_AsReqRcvContextBase) < 0) {
3136 PRINT_G(KERN_ERR, "Failed to allocate AR Req context"); 3136 PRINT_G(KERN_ERR, "Failed to allocate %s", "AR Req context");
3137 goto err; 3137 goto err;
3138 } 3138 }
3139 /* AR DMA response context allocation */ 3139 /* AR DMA response context allocation */
@@ -3141,21 +3141,21 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev,
3141 DMA_CTX_ASYNC_RESP, 0, AR_RESP_NUM_DESC, 3141 DMA_CTX_ASYNC_RESP, 0, AR_RESP_NUM_DESC,
3142 AR_RESP_BUF_SIZE, AR_RESP_SPLIT_BUF_SIZE, 3142 AR_RESP_BUF_SIZE, AR_RESP_SPLIT_BUF_SIZE,
3143 OHCI1394_AsRspRcvContextBase) < 0) { 3143 OHCI1394_AsRspRcvContextBase) < 0) {
3144 PRINT_G(KERN_ERR, "Failed to allocate AR Resp context"); 3144 PRINT_G(KERN_ERR, "Failed to allocate %s", "AR Resp context");
3145 goto err; 3145 goto err;
3146 } 3146 }
3147 /* AT DMA request context */ 3147 /* AT DMA request context */
3148 if (alloc_dma_trm_ctx(ohci, &ohci->at_req_context, 3148 if (alloc_dma_trm_ctx(ohci, &ohci->at_req_context,
3149 DMA_CTX_ASYNC_REQ, 0, AT_REQ_NUM_DESC, 3149 DMA_CTX_ASYNC_REQ, 0, AT_REQ_NUM_DESC,
3150 OHCI1394_AsReqTrContextBase) < 0) { 3150 OHCI1394_AsReqTrContextBase) < 0) {
3151 PRINT_G(KERN_ERR, "Failed to allocate AT Req context"); 3151 PRINT_G(KERN_ERR, "Failed to allocate %s", "AT Req context");
3152 goto err; 3152 goto err;
3153 } 3153 }
3154 /* AT DMA response context */ 3154 /* AT DMA response context */
3155 if (alloc_dma_trm_ctx(ohci, &ohci->at_resp_context, 3155 if (alloc_dma_trm_ctx(ohci, &ohci->at_resp_context,
3156 DMA_CTX_ASYNC_RESP, 1, AT_RESP_NUM_DESC, 3156 DMA_CTX_ASYNC_RESP, 1, AT_RESP_NUM_DESC,
3157 OHCI1394_AsRspTrContextBase) < 0) { 3157 OHCI1394_AsRspTrContextBase) < 0) {
3158 PRINT_G(KERN_ERR, "Failed to allocate AT Resp context"); 3158 PRINT_G(KERN_ERR, "Failed to allocate %s", "AT Resp context");
3159 goto err; 3159 goto err;
3160 } 3160 }
3161 /* Start off with a soft reset, to clear everything to a sane 3161 /* Start off with a soft reset, to clear everything to a sane