Lines Matching refs:buffer
26 char *buffer; /* pointer to begin of buffer */ member
37 static int pnp_printf(pnp_info_buffer_t * buffer, char *fmt, ...) in pnp_printf() argument
42 if (buffer->stop || buffer->error) in pnp_printf()
45 res = vsnprintf(buffer->curr, buffer->len - buffer->size, fmt, args); in pnp_printf()
47 if (buffer->size + res >= buffer->len) { in pnp_printf()
48 buffer->stop = 1; in pnp_printf()
51 buffer->curr += res; in pnp_printf()
52 buffer->size += res; in pnp_printf()
56 static void pnp_print_port(pnp_info_buffer_t * buffer, char *space, in pnp_print_port() argument
59 pnp_printf(buffer, "%sport %#llx-%#llx, align %#llx, size %#llx, " in pnp_print_port()
68 static void pnp_print_irq(pnp_info_buffer_t * buffer, char *space, in pnp_print_irq() argument
73 pnp_printf(buffer, "%sirq ", space); in pnp_print_irq()
77 pnp_printf(buffer, ","); in pnp_print_irq()
82 pnp_printf(buffer, "2/9"); in pnp_print_irq()
84 pnp_printf(buffer, "%i", i); in pnp_print_irq()
87 pnp_printf(buffer, "<none>"); in pnp_print_irq()
89 pnp_printf(buffer, " High-Edge"); in pnp_print_irq()
91 pnp_printf(buffer, " Low-Edge"); in pnp_print_irq()
93 pnp_printf(buffer, " High-Level"); in pnp_print_irq()
95 pnp_printf(buffer, " Low-Level"); in pnp_print_irq()
97 pnp_printf(buffer, " (optional)"); in pnp_print_irq()
98 pnp_printf(buffer, "\n"); in pnp_print_irq()
101 static void pnp_print_dma(pnp_info_buffer_t * buffer, char *space, in pnp_print_dma() argument
107 pnp_printf(buffer, "%sdma ", space); in pnp_print_dma()
111 pnp_printf(buffer, ","); in pnp_print_dma()
115 pnp_printf(buffer, "%i", i); in pnp_print_dma()
118 pnp_printf(buffer, "<none>"); in pnp_print_dma()
129 pnp_printf(buffer, " %s", s); in pnp_print_dma()
131 pnp_printf(buffer, " master"); in pnp_print_dma()
133 pnp_printf(buffer, " byte-count"); in pnp_print_dma()
135 pnp_printf(buffer, " word-count"); in pnp_print_dma()
150 pnp_printf(buffer, " %s\n", s); in pnp_print_dma()
153 static void pnp_print_mem(pnp_info_buffer_t * buffer, char *space, in pnp_print_mem() argument
158 pnp_printf(buffer, "%sMemory %#llx-%#llx, align %#llx, size %#llx", in pnp_print_mem()
164 pnp_printf(buffer, ", writeable"); in pnp_print_mem()
166 pnp_printf(buffer, ", cacheable"); in pnp_print_mem()
168 pnp_printf(buffer, ", range-length"); in pnp_print_mem()
170 pnp_printf(buffer, ", shadowable"); in pnp_print_mem()
172 pnp_printf(buffer, ", expansion ROM"); in pnp_print_mem()
186 pnp_printf(buffer, ", %s\n", s); in pnp_print_mem()
189 static void pnp_print_option(pnp_info_buffer_t * buffer, char *space, in pnp_print_option() argument
194 pnp_print_port(buffer, space, &option->u.port); in pnp_print_option()
197 pnp_print_mem(buffer, space, &option->u.mem); in pnp_print_option()
200 pnp_print_irq(buffer, space, &option->u.irq); in pnp_print_option()
203 pnp_print_dma(buffer, space, &option->u.dma); in pnp_print_option()
212 pnp_info_buffer_t *buffer; in options_show() local
217 buffer = kzalloc(sizeof(*buffer), GFP_KERNEL); in options_show()
218 if (!buffer) in options_show()
221 buffer->len = PAGE_SIZE; in options_show()
222 buffer->buffer = buf; in options_show()
223 buffer->curr = buffer->buffer; in options_show()
231 pnp_printf(buffer, "Dependent: %02i - " in options_show()
239 pnp_print_option(buffer, indent, option); in options_show()
242 ret = (buffer->curr - buf); in options_show()
243 kfree(buffer); in options_show()
252 pnp_info_buffer_t *buffer; in resources_show() local
260 buffer = kzalloc(sizeof(*buffer), GFP_KERNEL); in resources_show()
261 if (!buffer) in resources_show()
264 buffer->len = PAGE_SIZE; in resources_show()
265 buffer->buffer = buf; in resources_show()
266 buffer->curr = buffer->buffer; in resources_show()
268 pnp_printf(buffer, "state = %s\n", dev->active ? "active" : "disabled"); in resources_show()
273 pnp_printf(buffer, pnp_resource_type_name(res)); in resources_show()
276 pnp_printf(buffer, " disabled\n"); in resources_show()
284 pnp_printf(buffer, " %#llx-%#llx%s\n", in resources_show()
292 pnp_printf(buffer, " %lld\n", in resources_show()
298 ret = (buffer->curr - buf); in resources_show()
299 kfree(buffer); in resources_show()