Re: [RFC PATCH 2/9] HSI: Low Level Driver core

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Fri, Oct 30, 2009 at 11:00:01AM +0100, ext Sebastien Jan wrote:
> +static int __init reg_hsi_dev_ch(struct hsi_dev *hsi_ctrl, unsigned int p,
> +                                unsigned int ch)
> +{
> +       struct hsi_device *dev;
> +       struct hsi_port *port = &hsi_ctrl->hsi_port[p];
> +       int err;
> +
> +       dev = kzalloc(sizeof(*dev), GFP_KERNEL);
> +       if (!dev)
> +               return -ENOMEM;
> +
> +       dev->n_ctrl = hsi_ctrl->id;
> +       dev->n_p = p;
> +       dev->n_ch = ch;
> +       dev->ch = &port->hsi_channel[ch];
> +       dev->device.bus = &hsi_bus_type;
> +       dev->device.parent = hsi_ctrl->dev;
> +       dev->device.release = hsi_dev_release;
> +       if (dev->n_ctrl < 0)
> +               dev_set_name(&dev->device, "omap_hsi-p%u.c%u", p, ch);
> +       else
> +               dev_set_name(&dev->device, "omap_hsi%d-p%u.c%u", dev->n_ctrl, p,
> +                            ch);
> +
> +       err = device_register(&dev->device);
> +       if (err >= 0) {
> +               write_lock_bh(&port->hsi_channel[ch].rw_lock);
> +               port->hsi_channel[ch].dev = dev;
> +               write_unlock_bh(&port->hsi_channel[ch].rw_lock);
> +       } else {
> +               kfree(dev);
> +       }
> +       return err;
> +}

this will make a client's probe() function to be called twice, no ??

you should/could have a hsi_new_dummy() like on i2c ??

> +static int __init hsi_request_mpu_irq(struct hsi_port *hsi_p)

this should be done by hsi-omap.ko driver.

> +static int __init hsi_request_cawake_irq(struct hsi_port *hsi_p)

ditto.

> +static int __init hsi_ports_init(struct hsi_dev *hsi_ctrl)

ditto.

> +static int __init hsi_request_gdd_irq(struct hsi_dev *hsi_ctrl)

ditto.

> +static int __init hsi_controller_init(struct hsi_dev *hsi_ctrl,
> +                                     struct platform_device *pd)

ditto.

-- 
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux