Commit 9e1a0aab authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'char-misc-3.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char/misc fixes from Greg Kroah-Hartman:
 "Here are some tiny fixes for the w1 drivers and the final removal
  patch for getting rid of CONFIG_EXPERIMENTAL (all users of it are now
  gone from your tree, this just drops the Kconfig item itself.)

  All have been in the linux-next tree for a while"

* tag 'char-misc-3.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  final removal of CONFIG_EXPERIMENTAL
  w1: fix oops when w1_search is called from netlink connector
  w1-gpio: fix unused variable warning
  w1-gpio: remove erroneous __exit and __exit_p()
  ARM: w1-gpio: fix erroneous gpio requests
parents 5cd8846c 3d374d09
...@@ -176,6 +176,7 @@ static struct w1_gpio_platform_data w1_gpio_pdata = { ...@@ -176,6 +176,7 @@ static struct w1_gpio_platform_data w1_gpio_pdata = {
/* If you choose to use a pin other than PB16 it needs to be 3.3V */ /* If you choose to use a pin other than PB16 it needs to be 3.3V */
.pin = AT91_PIN_PB16, .pin = AT91_PIN_PB16,
.is_open_drain = 1, .is_open_drain = 1,
.ext_pullup_enable_pin = -EINVAL,
}; };
static struct platform_device w1_device = { static struct platform_device w1_device = {
......
...@@ -188,6 +188,7 @@ static struct spi_board_info portuxg20_spi_devices[] = { ...@@ -188,6 +188,7 @@ static struct spi_board_info portuxg20_spi_devices[] = {
static struct w1_gpio_platform_data w1_gpio_pdata = { static struct w1_gpio_platform_data w1_gpio_pdata = {
.pin = AT91_PIN_PA29, .pin = AT91_PIN_PA29,
.is_open_drain = 1, .is_open_drain = 1,
.ext_pullup_enable_pin = -EINVAL,
}; };
static struct platform_device w1_device = { static struct platform_device w1_device = {
......
...@@ -163,6 +163,7 @@ static struct platform_device vulcan_max6369 = { ...@@ -163,6 +163,7 @@ static struct platform_device vulcan_max6369 = {
static struct w1_gpio_platform_data vulcan_w1_gpio_pdata = { static struct w1_gpio_platform_data vulcan_w1_gpio_pdata = {
.pin = 14, .pin = 14,
.ext_pullup_enable_pin = -EINVAL,
}; };
static struct platform_device vulcan_w1_gpio = { static struct platform_device vulcan_w1_gpio = {
......
...@@ -505,6 +505,7 @@ static struct w1_gpio_platform_data w1_gpio_platform_data = { ...@@ -505,6 +505,7 @@ static struct w1_gpio_platform_data w1_gpio_platform_data = {
.pin = GPIO_ONE_WIRE, .pin = GPIO_ONE_WIRE,
.is_open_drain = 0, .is_open_drain = 0,
.enable_external_pullup = w1_enable_external_pullup, .enable_external_pullup = w1_enable_external_pullup,
.ext_pullup_enable_pin = -EINVAL,
}; };
struct platform_device raumfeld_w1_gpio_device = { struct platform_device raumfeld_w1_gpio_device = {
......
...@@ -47,11 +47,13 @@ static u8 w1_gpio_read_bit(void *data) ...@@ -47,11 +47,13 @@ static u8 w1_gpio_read_bit(void *data)
return gpio_get_value(pdata->pin) ? 1 : 0; return gpio_get_value(pdata->pin) ? 1 : 0;
} }
#if defined(CONFIG_OF)
static struct of_device_id w1_gpio_dt_ids[] = { static struct of_device_id w1_gpio_dt_ids[] = {
{ .compatible = "w1-gpio" }, { .compatible = "w1-gpio" },
{} {}
}; };
MODULE_DEVICE_TABLE(of, w1_gpio_dt_ids); MODULE_DEVICE_TABLE(of, w1_gpio_dt_ids);
#endif
static int w1_gpio_probe_dt(struct platform_device *pdev) static int w1_gpio_probe_dt(struct platform_device *pdev)
{ {
...@@ -158,7 +160,7 @@ static int w1_gpio_probe(struct platform_device *pdev) ...@@ -158,7 +160,7 @@ static int w1_gpio_probe(struct platform_device *pdev)
return err; return err;
} }
static int __exit w1_gpio_remove(struct platform_device *pdev) static int w1_gpio_remove(struct platform_device *pdev)
{ {
struct w1_bus_master *master = platform_get_drvdata(pdev); struct w1_bus_master *master = platform_get_drvdata(pdev);
struct w1_gpio_platform_data *pdata = pdev->dev.platform_data; struct w1_gpio_platform_data *pdata = pdev->dev.platform_data;
...@@ -210,7 +212,7 @@ static struct platform_driver w1_gpio_driver = { ...@@ -210,7 +212,7 @@ static struct platform_driver w1_gpio_driver = {
.of_match_table = of_match_ptr(w1_gpio_dt_ids), .of_match_table = of_match_ptr(w1_gpio_dt_ids),
}, },
.probe = w1_gpio_probe, .probe = w1_gpio_probe,
.remove = __exit_p(w1_gpio_remove), .remove = w1_gpio_remove,
.suspend = w1_gpio_suspend, .suspend = w1_gpio_suspend,
.resume = w1_gpio_resume, .resume = w1_gpio_resume,
}; };
......
...@@ -924,7 +924,8 @@ void w1_search(struct w1_master *dev, u8 search_type, w1_slave_found_callback cb ...@@ -924,7 +924,8 @@ void w1_search(struct w1_master *dev, u8 search_type, w1_slave_found_callback cb
tmp64 = (triplet_ret >> 2); tmp64 = (triplet_ret >> 2);
rn |= (tmp64 << i); rn |= (tmp64 << i);
if (kthread_should_stop()) { /* ensure we're called from kthread and not by netlink callback */
if (!dev->priv && kthread_should_stop()) {
mutex_unlock(&dev->bus_mutex); mutex_unlock(&dev->bus_mutex);
dev_dbg(&dev->dev, "Abort w1_search\n"); dev_dbg(&dev->dev, "Abort w1_search\n");
return; return;
......
...@@ -28,10 +28,6 @@ config BUILDTIME_EXTABLE_SORT ...@@ -28,10 +28,6 @@ config BUILDTIME_EXTABLE_SORT
menu "General setup" menu "General setup"
config EXPERIMENTAL
bool
default y
config BROKEN config BROKEN
bool bool
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment