struct device_attribute *attr, char *buf)
{
struct pnp_dev *dev = to_pnp_dev(dmdev);
+ pnp_info_buffer_t *buffer;
struct pnp_option *independent = dev->independent;
struct pnp_option *dependent = dev->dependent;
int ret, dep = 1;
- pnp_info_buffer_t *buffer = (pnp_info_buffer_t *)
- pnp_alloc(sizeof(pnp_info_buffer_t));
+ buffer = pnp_alloc(sizeof(pnp_info_buffer_t));
if (!buffer)
return -ENOMEM;
char *buf)
{
struct pnp_dev *dev = to_pnp_dev(dmdev);
+ pnp_info_buffer_t *buffer;
struct pnp_resource *pnp_res;
struct resource *res;
int ret;
- pnp_info_buffer_t *buffer;
if (!dev)
return -EINVAL;
- buffer = (pnp_info_buffer_t *) pnp_alloc(sizeof(pnp_info_buffer_t));
+ buffer = pnp_alloc(sizeof(pnp_info_buffer_t));
if (!buffer)
return -ENOMEM;
+
buffer->len = PAGE_SIZE;
buffer->buffer = buf;
buffer->curr = buffer->buffer;
return ret;
}
-static ssize_t
-pnp_set_current_resources(struct device *dmdev, struct device_attribute *attr,
- const char *ubuf, size_t count)
+static ssize_t pnp_set_current_resources(struct device *dmdev,
+ struct device_attribute *attr,
+ const char *ubuf, size_t count)
{
struct pnp_dev *dev = to_pnp_dev(dmdev);
char *buf = (void *)ubuf;