Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1317509
| From | Henry Chen <henryc.chen@mediatek.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V2 4/4] mfd: mediatek: add MT6323 support to MT6397 driver |
| Date | 2016-01-26 04:40 +0100 |
| Message-ID | <qV2E2-5Ed-9@gated-at.bofh.it> (permalink) |
| References | <qUMpz-2q9-5@gated-at.bofh.it> <qUOKL-3WU-35@gated-at.bofh.it> <qURpi-60C-49@gated-at.bofh.it> <qUUna-8cw-59@gated-at.bofh.it> <qUUGv-8W-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, 2016-01-25 at 19:59 +0100, John Crispin wrote:
>
> On 25/01/2016 19:44, Matthias Brugger wrote:
> > On Monday 25 Jan 2016 16:36:40 John Crispin wrote:
> >> Hi,
> >>
> >> On 25/01/2016 13:41, Lee Jones wrote:
> >>> Please honour the subject format of the subsystem you are contributing
> >>> to.
> >>>
> >>> `git log --oneline -- $subsystem` gives you this.
> >>>
> >>> On Mon, 25 Jan 2016, John Crispin wrote:
> >>>> Signed-off-by: John Crispin <blogic@openwrt.org>
> >>>> ---
> >>
> >> [...]
> >>
> >>>> @@ -261,6 +271,15 @@ static int mt6397_probe(struct platform_device
> >>>> *pdev)
> >>>>
> >>>> }
> >>>>
> >>>> switch (id & 0xff) {
> >>>>
> >>>> + case MT6323_CID_CODE:
> >>>> + mt6397->int_con[0] = MT6323_INT_CON0;
> >>>
> >>> This is confusing. You're still using memory allocated for a mt6397
> >>> device.
> >>
> >> the variable is currently defined as struct mt6397_chip *mt6397;
> >> shall i only change the name or also create a patch to rename the struct ?
> >>
> >
> > I think we should rename the struct and the file as well.
> >
> > Cheers,
> > Matthias
>
> Hi,
>
> that would have been my next question. renaming the struct would imply
> renaming the driver and the whole namespace contained within. We would
> then also need to change the Kconfig and Makefile. I am happy to do this
> but want to be sure that is is actually wanted.
>
> John
Hi,
Since mt6323 was similar with mt6397, I think we can reuse the
mt6397_chip without duplicate code.
Maybe we can rename the local variable name to avoid confusing.
struct mt6397_chip *mt_pmic;
...
...
switch (id & 0xff) {
case MT6323_CID_CODE:
mt_pmic->int_con[0] = MT6323_INT_CON0;
mt_pmic->int_con[1] = MT6323_INT_CON1;
...
...
Henry
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH V2 0/4] mfd: mediatek: add mt6323 support to the mt6397 driver John Crispin <blogic@openwrt.org> - 2016-01-25 11:20 +0100
[PATCH V2 1/4] dt-bindings: mfd: Add bindings for the MediaTek MT6323 PMIC John Crispin <blogic@openwrt.org> - 2016-01-25 11:20 +0100
[PATCH V2 2/4] mfd: mediatek: int_con and int_status may vary in location John Crispin <blogic@openwrt.org> - 2016-01-25 11:20 +0100
Re: [PATCH V2 2/4] mfd: mediatek: int_con and int_status may vary in location Lee Jones <lee.jones@linaro.org> - 2016-01-25 13:40 +0100
[PATCH V2 4/4] mfd: mediatek: add MT6323 support to MT6397 driver John Crispin <blogic@openwrt.org> - 2016-01-25 11:20 +0100
Re: [PATCH V2 4/4] mfd: mediatek: add MT6323 support to MT6397 driver Lee Jones <lee.jones@linaro.org> - 2016-01-25 13:50 +0100
Re: [PATCH V2 4/4] mfd: mediatek: add MT6323 support to MT6397 driver John Crispin <blogic@openwrt.org> - 2016-01-25 16:40 +0100
Re: [PATCH V2 4/4] mfd: mediatek: add MT6323 support to MT6397 driver Matthias Brugger <matthias.bgg@gmail.com> - 2016-01-25 19:50 +0100
Re: [PATCH V2 4/4] mfd: mediatek: add MT6323 support to MT6397 driver John Crispin <blogic@openwrt.org> - 2016-01-25 20:10 +0100
Re: [PATCH V2 4/4] mfd: mediatek: add MT6323 support to MT6397 driver Henry Chen <henryc.chen@mediatek.com> - 2016-01-26 04:40 +0100
Re: [PATCH V2 4/4] mfd: mediatek: add MT6323 support to MT6397 driver John Crispin <blogic@openwrt.org> - 2016-01-26 08:20 +0100
Re: [PATCH V2 4/4] mfd: mediatek: add MT6323 support to MT6397 driver Lee Jones <lee.jones@linaro.org> - 2016-01-26 09:40 +0100
Re: [PATCH V2 4/4] mfd: mediatek: add MT6323 support to MT6397 driver John Crispin <blogic@openwrt.org> - 2016-01-26 09:50 +0100
Re: [PATCH V2 4/4] mfd: mediatek: add MT6323 support to MT6397 driver John Crispin <blogic@openwrt.org> - 2016-01-26 13:10 +0100
Re: [PATCH V2 4/4] mfd: mediatek: add MT6323 support to MT6397 driver Lee Jones <lee.jones@linaro.org> - 2016-01-26 15:10 +0100
[PATCH V2 3/4] mfd: mediatek: add support for different Slave types John Crispin <blogic@openwrt.org> - 2016-01-25 11:20 +0100
Re: [PATCH V2 3/4] mfd: mediatek: add support for different Slave types Lee Jones <lee.jones@linaro.org> - 2016-01-25 13:40 +0100
csiph-web