Re: [PATCH v3 1/3] mfd: add support for Diolan DLN-2 devices

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

 



On Mon, Sep 8, 2014 at 2:32 PM, Johan Hovold <johan@xxxxxxxxxx> wrote:
>
> On Fri, Sep 05, 2014 at 06:17:57PM +0300, Octavian Purdila wrote:
> > This patch implements the USB part of the Diolan USB-I2C/SPI/GPIO
> > Master Adapter DLN-2. Details about the device can be found here:
> >
<snip>
>
> First of all, this is much cleaner than the first non-MFD version. I'll
> have a look at the subdrivers shortly as well.
>

Hi Johan,

I have addressed all you comments except one, please see bellow. I
will wait for the review on the subdrivers before submitting a new
version of the patch set. Thanks for for review !

<snip>
> > +static bool find_free_slot(struct dln2_mod_rx_slots *rxs, int *slot)
> > +{
> > +     unsigned long flags;
> > +
> > +     spin_lock_irqsave(&rxs->lock, flags);
> > +
> > +     *slot = find_first_zero_bit(&rxs->bmap, DLN2_MAX_RX_SLOTS);
> > +
> > +     if (*slot < DLN2_MAX_RX_SLOTS) {
> > +             struct dln2_rx_context *rxc = &rxs->slots[*slot];
> > +
> > +             init_completion(&rxc->done);
>
> Initialise the completions when you allocate them (and there's no need
> to re-init here).
>

You are right, but I think we need a reinit_completion(). Technically
we don't, as we don't use complete_all(), but I feel it is cleaner
that way. I will move the initialization in probe and add the
reinit_completion() in free_rx_slot. Is that OK with you?
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux