Re: [PATCH 01/27] mtd: nand: introduce function to fix a common bug in most nand-drivers not showing a device in sysfs

2014-11-05 Thread Frans Klaver
On Wed, Nov 5, 2014 at 10:34 AM, Brian Norris wrote: > On Sun, Nov 02, 2014 at 10:03:53PM +0100, Frans Klaver wrote: >> On Wed, May 28, 2014 at 01:43:44AM -0700, Brian Norris wrote: >> > And in fact, if any drivers are missing mtd->name, perhaps it's best to >> > just modify the MTD registration

Re: [PATCH 01/27] mtd: nand: introduce function to fix a common bug in most nand-drivers not showing a device in sysfs

2014-11-05 Thread Brian Norris
On Sun, Nov 02, 2014 at 10:03:53PM +0100, Frans Klaver wrote: > On Wed, May 28, 2014 at 01:43:44AM -0700, Brian Norris wrote: > > And in fact, if any drivers are missing mtd->name, perhaps it's best to > > just modify the MTD registration to give them a default: > > > > if (!mtd->name) > >

Re: [PATCH 01/27] mtd: nand: introduce function to fix a common bug in most nand-drivers not showing a device in sysfs

2014-11-05 Thread Brian Norris
On Sun, Nov 02, 2014 at 10:03:53PM +0100, Frans Klaver wrote: On Wed, May 28, 2014 at 01:43:44AM -0700, Brian Norris wrote: And in fact, if any drivers are missing mtd-name, perhaps it's best to just modify the MTD registration to give them a default: if (!mtd-name)

Re: [PATCH 01/27] mtd: nand: introduce function to fix a common bug in most nand-drivers not showing a device in sysfs

2014-11-05 Thread Frans Klaver
On Wed, Nov 5, 2014 at 10:34 AM, Brian Norris computersforpe...@gmail.com wrote: On Sun, Nov 02, 2014 at 10:03:53PM +0100, Frans Klaver wrote: On Wed, May 28, 2014 at 01:43:44AM -0700, Brian Norris wrote: And in fact, if any drivers are missing mtd-name, perhaps it's best to just modify the

Re: [PATCH 01/27] mtd: nand: introduce function to fix a common bug in most nand-drivers not showing a device in sysfs

2014-11-02 Thread Frans Klaver
On Wed, May 28, 2014 at 01:43:44AM -0700, Brian Norris wrote: > And in fact, if any drivers are missing mtd->name, perhaps it's best to > just modify the MTD registration to give them a default: > > if (!mtd->name) > mtd->name = dev_name(>dev); > ... > How about we rethink

Re: [PATCH 01/27] mtd: nand: introduce function to fix a common bug in most nand-drivers not showing a device in sysfs

2014-11-02 Thread Frans Klaver
On Wed, May 28, 2014 at 01:43:44AM -0700, Brian Norris wrote: And in fact, if any drivers are missing mtd-name, perhaps it's best to just modify the MTD registration to give them a default: if (!mtd-name) mtd-name = dev_name(pdev-dev); ... How about we rethink the

Re: [PATCH 01/27] mtd: nand: introduce function to fix a common bug in most nand-drivers not showing a device in sysfs

2014-05-30 Thread Alexander Holler
Am 29.05.2014 08:17, schrieb Artem Bityutskiy: On Wed, 2014-05-28 at 23:09 +0200, Alexander Holler wrote: I'm very sorry, but I find such discussions extremly tiresome. Why discussing then at all, just go ahead and to something else. Agreed. In order to maintain psychical health it's better

Re: [PATCH 01/27] mtd: nand: introduce function to fix a common bug in most nand-drivers not showing a device in sysfs

2014-05-30 Thread Alexander Holler
Am 29.05.2014 08:17, schrieb Artem Bityutskiy: On Wed, 2014-05-28 at 23:09 +0200, Alexander Holler wrote: I'm very sorry, but I find such discussions extremly tiresome. Why discussing then at all, just go ahead and to something else. Agreed. In order to maintain psychical health it's better

Re: [PATCH 01/27] mtd: nand: introduce function to fix a common bug in most nand-drivers not showing a device in sysfs

2014-05-29 Thread Artem Bityutskiy
On Wed, 2014-05-28 at 23:09 +0200, Alexander Holler wrote: > I'm very sorry, but I find such discussions extremly tiresome. Why discussing then at all, just go ahead and to something else. -- Best Regards, Artem Bityutskiy -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH 01/27] mtd: nand: introduce function to fix a common bug in most nand-drivers not showing a device in sysfs

2014-05-29 Thread Artem Bityutskiy
On Wed, 2014-05-28 at 23:09 +0200, Alexander Holler wrote: I'm very sorry, but I find such discussions extremly tiresome. Why discussing then at all, just go ahead and to something else. -- Best Regards, Artem Bityutskiy -- To unsubscribe from this list: send the line unsubscribe linux-kernel

Re: [PATCH 01/27] mtd: nand: introduce function to fix a common bug in most nand-drivers not showing a device in sysfs

2014-05-28 Thread Alexander Holler
Am 28.05.2014 23:49, schrieb Brian Norris: On Wed, May 28, 2014 at 11:09:05PM +0200, Alexander Holler wrote: I'm very sorry, but I find such discussions extremly tiresome. If you just would have suggested that one if to prevent that someone who doesn't c existing code would end up with a

Re: [PATCH 01/27] mtd: nand: introduce function to fix a common bug in most nand-drivers not showing a device in sysfs

2014-05-28 Thread Brian Norris
On Wed, May 28, 2014 at 11:09:05PM +0200, Alexander Holler wrote: > I'm very sorry, but I find such discussions extremly tiresome. > > If you just would have suggested that one if to prevent that someone who > doesn't c existing code would end up with a clobbered name (which he > obviously can't

Re: [PATCH 01/27] mtd: nand: introduce function to fix a common bug in most nand-drivers not showing a device in sysfs

2014-05-28 Thread Alexander Holler
Am 28.05.2014 22:10, schrieb Brian Norris: > On Wed, May 28, 2014 at 08:52:06PM +0200, Alexander Holler wrote: >> Am 28.05.2014 10:43, schrieb Brian Norris: >>> On Tue, May 27, 2014 at 12:12:26AM +0200, Alexander Holler wrote: +{ + mtd->priv = priv; >>> >>> I don't think you

Re: [PATCH 01/27] mtd: nand: introduce function to fix a common bug in most nand-drivers not showing a device in sysfs

2014-05-28 Thread Brian Norris
On Wed, May 28, 2014 at 08:52:06PM +0200, Alexander Holler wrote: > Am 28.05.2014 10:43, schrieb Brian Norris: > >On Tue, May 27, 2014 at 12:12:26AM +0200, Alexander Holler wrote: > >>+{ > >>+ mtd->priv = priv; > > > >I don't think you should hide this one here. It will be quite obvious if

Re: [PATCH 01/27] mtd: nand: introduce function to fix a common bug in most nand-drivers not showing a device in sysfs

2014-05-28 Thread Alexander Holler
Am 28.05.2014 10:43, schrieb Brian Norris: On Tue, May 27, 2014 at 12:12:26AM +0200, Alexander Holler wrote: --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include @@ -366,6 +366,15 @@ static inline

Re: [PATCH 01/27] mtd: nand: introduce function to fix a common bug in most nand-drivers not showing a device in sysfs

2014-05-28 Thread Brian Norris
On Tue, May 27, 2014 at 12:12:26AM +0200, Alexander Holler wrote: > --- a/include/linux/mtd/mtd.h > +++ b/include/linux/mtd/mtd.h > @@ -23,7 +23,7 @@ > #include > #include > #include > -#include > +#include > > #include > > @@ -366,6 +366,15 @@ static inline int mtd_can_have_bb(const

Re: [PATCH 01/27] mtd: nand: introduce function to fix a common bug in most nand-drivers not showing a device in sysfs

2014-05-28 Thread Brian Norris
On Wed, May 28, 2014 at 08:52:06PM +0200, Alexander Holler wrote: Am 28.05.2014 10:43, schrieb Brian Norris: On Tue, May 27, 2014 at 12:12:26AM +0200, Alexander Holler wrote: +{ + mtd-priv = priv; I don't think you should hide this one here. It will be quite obvious if a driver

Re: [PATCH 01/27] mtd: nand: introduce function to fix a common bug in most nand-drivers not showing a device in sysfs

2014-05-28 Thread Alexander Holler
Am 28.05.2014 22:10, schrieb Brian Norris: On Wed, May 28, 2014 at 08:52:06PM +0200, Alexander Holler wrote: Am 28.05.2014 10:43, schrieb Brian Norris: On Tue, May 27, 2014 at 12:12:26AM +0200, Alexander Holler wrote: +{ + mtd-priv = priv; I don't think you should hide this one here.

Re: [PATCH 01/27] mtd: nand: introduce function to fix a common bug in most nand-drivers not showing a device in sysfs

2014-05-28 Thread Brian Norris
On Wed, May 28, 2014 at 11:09:05PM +0200, Alexander Holler wrote: I'm very sorry, but I find such discussions extremly tiresome. If you just would have suggested that one if to prevent that someone who doesn't cp existing code would end up with a clobbered name (which he obviously can't miss

Re: [PATCH 01/27] mtd: nand: introduce function to fix a common bug in most nand-drivers not showing a device in sysfs

2014-05-28 Thread Alexander Holler
Am 28.05.2014 23:49, schrieb Brian Norris: On Wed, May 28, 2014 at 11:09:05PM +0200, Alexander Holler wrote: I'm very sorry, but I find such discussions extremly tiresome. If you just would have suggested that one if to prevent that someone who doesn't cp existing code would end up with a

Re: [PATCH 01/27] mtd: nand: introduce function to fix a common bug in most nand-drivers not showing a device in sysfs

2014-05-28 Thread Brian Norris
On Tue, May 27, 2014 at 12:12:26AM +0200, Alexander Holler wrote: --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h @@ -23,7 +23,7 @@ #include linux/types.h #include linux/uio.h #include linux/notifier.h -#include linux/device.h +#include linux/platform_device.h #include

Re: [PATCH 01/27] mtd: nand: introduce function to fix a common bug in most nand-drivers not showing a device in sysfs

2014-05-28 Thread Alexander Holler
Am 28.05.2014 10:43, schrieb Brian Norris: On Tue, May 27, 2014 at 12:12:26AM +0200, Alexander Holler wrote: --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h @@ -23,7 +23,7 @@ #include linux/types.h #include linux/uio.h #include linux/notifier.h -#include linux/device.h

[PATCH 01/27] mtd: nand: introduce function to fix a common bug in most nand-drivers not showing a device in sysfs

2014-05-26 Thread Alexander Holler
Most nand drivers don't set a parent device for the mtd-device. The result is that information in sysfs is missing (no folder device). Comparing the output of git grep mtd_device_parse_register drivers/mtd/nand/ with git grep parent drivers/mtd/nand/ | cut -f 1 | sort -u

[PATCH 01/27] mtd: nand: introduce function to fix a common bug in most nand-drivers not showing a device in sysfs

2014-05-26 Thread Alexander Holler
Most nand drivers don't set a parent device for the mtd-device. The result is that information in sysfs is missing (no folder device). Comparing the output of git grep mtd_device_parse_register drivers/mtd/nand/ with git grep parent drivers/mtd/nand/ | cut -f 1 | sort -u