1. 12 7月, 2012 5 次提交
  2. 30 5月, 2012 13 次提交
  3. 20 5月, 2012 1 次提交
    • M
      mfd: Convert wm831x to irq_domain · cd99758b
      Mark Brown 提交于
      The modern idiom is to use irq_domain to allocate interrupts. This is
      useful partly to allow further infrastructure to be based on the domains
      and partly because it makes it much easier to allocate virtual interrupts
      to devices as we don't need to allocate a contiguous range of interrupt
      numbers.
      
      Convert the wm831x driver over to this infrastructure, using a legacy
      IRQ mapping if an irq_base is specified in platform data and otherwise
      using a linear mapping, always registering the interrupts even if they
      won't ever be used. Only boards which need to use the GPIOs as
      interrupts should need to use an irq_base.
      
      This means that we can't use the MFD irq_base management since the
      unless we're using an explicit irq_base from platform data we can't rely
      on a linear mapping of interrupts.  Instead we need to map things via
      the irq_domain - provide a conveniencem function wm831x_irq() to save a
      small amount of typing when doing so. Looking at this I couldn't clearly
      see anything the MFD core could do to make this nicer.
      
      Since we're not supporting device tree yet there's no meaningful
      advantage if we don't do this conversion in one, the fact that the
      interrupt resources are used for repeated IP blocks makes accessor
      functions for the irq_domain more trouble to do than they're worth.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      cd99758b
  4. 18 5月, 2012 1 次提交
  5. 26 4月, 2012 2 次提交
    • J
      rtc: Fix possible null pointer dereference in rtc-mpc5121.c · e48b5e82
      John Stultz 提交于
      Mark Loard pointed out:
      "For example, this beauty from rtc-mpc5121.c in the same update:
         ...
         rtc->rtc = rtc_device_register("mpc5200-rtc", &op->dev,
                                         &mpc5200_rtc_ops, THIS_MODULE);
         ...
      
         rtc->rtc->uie_unsupported = 1;    // <<<< Ooops NULL pointer >>>>
      
         if (IS_ERR(rtc->rtc)) {           // <<<< this needs to be earlier >>>>
                 err = PTR_ERR(rtc->rtc);
                 goto out_free_irq;
         }
         ..."
      
      This patch moves setting the uie_unsupported flag to after we validate
      the rtc->rtc pointer to resolve this.
      
      Reported by: Mark Lord <kernel@teksavvy.com>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      Link: http://lkml.kernel.org/r/1335300215-21427-1-git-send-email-john.stultz@linaro.orgSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      e48b5e82
    • A
      drivers/rtc/rtc-ds1307.c: fix BUG shown with lock debugging enabled · 3f5ec5e0
      Anatolij Gustschin 提交于
      Add struct bin_attribute initialization to fix the following bug:
      
      rtc-ds1307 3-0068: rtc core: registered ds1307 as rtc0
      BUG: key cfb14fcc not in .data!
      ------------[ cut here ]------------
      WARNING: at kernel/lockdep.c:2986 sysfs_add_file_mode+0x84/0xdc()
      Modules linked in:
      [<c0018d94>] (unwind_backtrace+0x0/0xf8) from [<c0031f7c>] (warn_slowpath_common+0x4c/0x64)
      [<c0031f7c>] (warn_slowpath_common+0x4c/0x64) from [<c0031fb0>] (warn_slowpath_null+0x1c/0x24)
      [<c0031fb0>] (warn_slowpath_null+0x1c/0x24) from [<c012f7ac>] (sysfs_add_file_mode+0x84/0xdc)
      [<c012f7ac>] (sysfs_add_file_mode+0x84/0xdc) from [<c04b11e4>] (ds1307_probe+0x5e4/0x6ac)
      [<c04b11e4>] (ds1307_probe+0x5e4/0x6ac) from [<c036e600>] (i2c_device_probe+0xdc/0x108)
      [<c036e600>] (i2c_device_probe+0xdc/0x108) from [<c02cdf84>] (driver_probe_device+0x90/0x210)
      [<c02cdf84>] (driver_probe_device+0x90/0x210) from [<c02ce198>] (__driver_attach+0x94/0x98)
      [<c02ce198>] (__driver_attach+0x94/0x98) from [<c02cc824>] (bus_for_each_dev+0x50/0x7c)
      [<c02cc824>] (bus_for_each_dev+0x50/0x7c) from [<c02cd780>] (bus_add_driver+0x184/0x244)
      [<c02cd780>] (bus_add_driver+0x184/0x244) from [<c02ce43c>] (driver_register+0x78/0x12c)
      [<c02ce43c>] (driver_register+0x78/0x12c) from [<c03701ac>] (i2c_register_driver+0x2c/0xb4)
      [<c03701ac>] (i2c_register_driver+0x2c/0xb4) from [<c0008798>] (do_one_initcall+0x34/0x178)
      [<c0008798>] (do_one_initcall+0x34/0x178) from [<c0691860>] (kernel_init+0xdc/0x194)
      [<c0691860>] (kernel_init+0xdc/0x194) from [<c0013cf0>] (kernel_thread_exit+0x0/0x8)
      
      Since commit 6992f533 ("sysfs: Use one lockdep class per sysfs
      attribute") this initialization is required.
      Reported-by: NStefano Babic <sbabic@denx.de>
      Tested-by: NStefano Babic <sbabic@denx.de>
      Signed-off-by: NAnatolij Gustschin <agust@denx.de>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: Stefano Babic <sbabic@denx.de>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Acked-by: NWolfram Sang <w.sang@pengutronix.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3f5ec5e0
  6. 25 4月, 2012 1 次提交
  7. 16 4月, 2012 1 次提交
  8. 13 4月, 2012 6 次提交
  9. 06 4月, 2012 1 次提交
  10. 26 3月, 2012 2 次提交
  11. 24 3月, 2012 7 次提交