Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1435319

Re: [PATCH v3 1/4] mfd: mxs-lradc: Add support for mxs-lradc MFD

From Harald Geyer <harald@ccbib.org>
Newsgroups linux.kernel
Subject Re: [PATCH v3 1/4] mfd: mxs-lradc: Add support for mxs-lradc MFD
Date 2016-07-01 15:20 +0200
Message-ID <rQ6wp-76i-15@gated-at.bofh.it> (permalink)
References <rNy5P-7Tc-7@gated-at.bofh.it> <rNy5P-7Tc-9@gated-at.bofh.it> <rP43E-XT-25@gated-at.bofh.it> <rQ57k-67M-47@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Ksenija!

Ksenija Stanojević writes:
> On Tue, Jun 28, 2016 at 6:28 PM, Lee Jones <lee.jones@linaro.org> wrote:
> >> +static int mxs_lradc_add_device(struct platform_device *pdev,
> >> +                             struct mxs_lradc *lradc, char *name, int i)
> >> +{
> >> +     struct mfd_cell *cell;
> >> +
> >> +     cell = &lradc->cells[i];
> >> +     cell->name = name;
> >> +     cell->platform_data = lradc;
> >> +     cell->pdata_size = sizeof(*lradc);
> >> +
> >> +     return devm_mfd_add_devices(&pdev->dev, -1, cell, 1, NULL, 0, NULL);
> >> +}
> >
> > Please don't roll your own API.
> >
> > Use 'struct mfd_cell' like everyone else does.
> 
> It has been suggested in previous reviews to use separate function to
> register mfd device, and to make mfd_cell allocate dynamically because
> struc mxs-lradc is allocated dynamically.
> But I can revrse changes and make mfd_cells allocate staticaly
> wthout separate function.

I think making mfd_cells members of struct mxs-lradc will address all
review comments.

HTH,
Harald

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/4] mxs-lradc: Split driver into MFD Ksenija Stanojevic <ksenija.stanojevic@gmail.com> - 2016-06-24 14:10 +0200
  [PATCH v3 1/4] mfd: mxs-lradc: Add support for mxs-lradc MFD Ksenija Stanojevic <ksenija.stanojevic@gmail.com> - 2016-06-24 14:10 +0200
    Re: [PATCH v3 1/4] mfd: mxs-lradc: Add support for mxs-lradc MFD Stefan Wahren <stefan.wahren@i2se.com> - 2016-06-24 23:20 +0200
    Re: [PATCH v3 1/4] mfd: mxs-lradc: Add support for mxs-lradc MFD Lee Jones <lee.jones@linaro.org> - 2016-06-28 18:30 +0200
      Re: [PATCH v3 1/4] mfd: mxs-lradc: Add support for mxs-lradc MFD Ksenija Stanojević <ksenija.stanojevic@gmail.com> - 2016-07-01 13:50 +0200
        Re: [PATCH v3 1/4] mfd: mxs-lradc: Add support for mxs-lradc MFD Harald Geyer <harald@ccbib.org> - 2016-07-01 15:20 +0200
  [PATCH v3 2/4] iio: adc: mxs-lradc: Add support for adc driver Ksenija Stanojevic <ksenija.stanojevic@gmail.com> - 2016-06-24 14:20 +0200
    Re: [PATCH v3 2/4] iio: adc: mxs-lradc: Add support for adc driver Stefan Wahren <stefan.wahren@i2se.com> - 2016-06-24 23:20 +0200
  [PATCH v3 3/4] input: touchscreen: mxs-lradc: Add support for touchscreen Ksenija Stanojevic <ksenija.stanojevic@gmail.com> - 2016-06-24 14:20 +0200

csiph-web