lkml.org 
[lkml]   [2011]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/4] staging: vme: add struct vme_dev for VME devices
On Mon, Sep 26, 2011 at 11:27:15 +0200, Manohar Vanga wrote:
(snip)
> diff --git a/drivers/staging/vme/vme.c b/drivers/staging/vme/vme.c
> index 810fe1f..76e08f3 100644
> --- a/drivers/staging/vme/vme.c
> +++ b/drivers/staging/vme/vme.c
(snip)
> @@ -1358,26 +1355,29 @@ int vme_register_bridge(struct vme_bridge *bridge)
> * specification.
> */
> for (i = 0; i < VME_SLOTS_MAX; i++) {
> - bridge->dev[i] = kzalloc(sizeof(struct device), GFP_KERNEL);
> + bridge->dev[i] = kzalloc(sizeof(struct vme_dev), GFP_KERNEL);
> if (!bridge->dev[i]) {
> retval = -ENOMEM;
> goto err_devalloc;
> }
> - dev = bridge->dev[i];
> - memset(dev, 0, sizeof(struct device));
> -
> - dev->parent = bridge->parent;
> - dev->bus = &vme_bus_type;
> - dev->release = vme_dev_release;
> + vdev = bridge->dev[i];
> + memset(vdev, 0, sizeof(struct vme_dev));

minor nit, in fact removed in patch 2: memset here is redundant
(see kzalloc above).

The rest looks good.

Emilio


\
 
 \ /
  Last update: 2011-09-27 00:55    [from the cache]
©2003-2011 Jasper Spaans