Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 871738 Details for
Bug 1021036
ideapad_laptop loads on yoga 2 pro and breaks wireless
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch to ideapad_laptop.c
ideapad_laptop.patch (text/plain), 3.43 KB, created by
Peter F. Patel-Schneider
on 2014-03-07 01:49:45 UTC
(
hide
)
Description:
patch to ideapad_laptop.c
Filename:
MIME Type:
Creator:
Peter F. Patel-Schneider
Created:
2014-03-07 01:49:45 UTC
Size:
3.43 KB
patch
obsolete
>diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c >index 6dd060a..d2dd29d 100644 >--- a/drivers/platform/x86/ideapad-laptop.c >+++ b/drivers/platform/x86/ideapad-laptop.c >@@ -27,6 +27,7 @@ > #include <linux/init.h> > #include <linux/types.h> > #include <linux/acpi.h> >+#include <linux/dmi.h> > #include <linux/rfkill.h> > #include <linux/platform_device.h> > #include <linux/input.h> >@@ -84,6 +85,7 @@ struct ideapad_private { > struct input_dev *inputdev; > struct backlight_device *blightdev; > struct dentry *debug; >+ bool rfkill_present; > unsigned long cfg; > }; > >@@ -474,13 +476,15 @@ static void ideapad_sync_rfk_state(struct ideapad_private *priv) > unsigned long hw_blocked; > int i; > >- if (read_ec_data(priv->adev->handle, VPCCMD_R_RF, &hw_blocked)) >- return; >- hw_blocked = !hw_blocked; >+ if (priv->rfkill_present) { >+ if (read_ec_data(priv->adev->handle, VPCCMD_R_RF, &hw_blocked)) >+ return; >+ hw_blocked = !hw_blocked; > >- for (i = 0; i < IDEAPAD_RFKILL_DEV_NUM; i++) >- if (priv->rfk[i]) >- rfkill_set_hw_state(priv->rfk[i], hw_blocked); >+ for (i = 0; i < IDEAPAD_RFKILL_DEV_NUM; i++) >+ if (priv->rfk[i]) >+ rfkill_set_hw_state(priv->rfk[i], hw_blocked); >+ } > } > > static int ideapad_register_rfkill(struct ideapad_private *priv, int dev) >@@ -825,6 +829,7 @@ static int ideapad_acpi_add(struct platform_device *pdev) > int cfg; > struct ideapad_private *priv; > struct acpi_device *adev; >+ char const *s; > > ret = acpi_bus_get_device(ACPI_HANDLE(&pdev->dev), &adev); > if (ret) >@@ -842,6 +847,15 @@ static int ideapad_acpi_add(struct platform_device *pdev) > priv->adev = adev; > priv->platform_device = pdev; > >+ /* check for Yoga 2 Pro, which has no rfkill switches */ >+ s = dmi_get_system_info(DMI_PRODUCT_VERSION); >+ if (s && !(strnicmp(s, "Lenovo Yoga 2 Pro", 17)) ) { >+ priv->rfkill_present = false; >+ } else { >+ priv->rfkill_present = true; >+ } >+ >+ > ret = ideapad_sysfs_init(priv); > if (ret) > goto sysfs_failed; >@@ -854,11 +868,13 @@ static int ideapad_acpi_add(struct platform_device *pdev) > if (ret) > goto input_failed; > >- for (i = 0; i < IDEAPAD_RFKILL_DEV_NUM; i++) { >- if (test_bit(ideapad_rfk_data[i].cfgbit, &priv->cfg)) >- ideapad_register_rfkill(priv, i); >- else >- priv->rfk[i] = NULL; >+ if (priv->rfkill_present) { >+ for (i = 0; i < IDEAPAD_RFKILL_DEV_NUM; i++) { >+ if (test_bit(ideapad_rfk_data[i].cfgbit, &priv->cfg)) >+ ideapad_register_rfkill(priv, i); >+ else >+ priv->rfk[i] = NULL; >+ } > } > ideapad_sync_rfk_state(priv); > ideapad_sync_touchpad_state(priv); >@@ -877,8 +893,10 @@ static int ideapad_acpi_add(struct platform_device *pdev) > notification_failed: > ideapad_backlight_exit(priv); > backlight_failed: >- for (i = 0; i < IDEAPAD_RFKILL_DEV_NUM; i++) >- ideapad_unregister_rfkill(priv, i); >+ if (priv->rfkill_present) { >+ for (i = 0; i < IDEAPAD_RFKILL_DEV_NUM; i++) >+ ideapad_unregister_rfkill(priv, i); >+ } > ideapad_input_exit(priv); > input_failed: > ideapad_debugfs_exit(priv); >@@ -897,8 +915,10 @@ static int ideapad_acpi_remove(struct platform_device *pdev) > acpi_remove_notify_handler(priv->adev->handle, > ACPI_DEVICE_NOTIFY, ideapad_acpi_notify); > ideapad_backlight_exit(priv); >- for (i = 0; i < IDEAPAD_RFKILL_DEV_NUM; i++) >- ideapad_unregister_rfkill(priv, i); >+ if (priv->rfkill_present) { >+ for (i = 0; i < IDEAPAD_RFKILL_DEV_NUM; i++) >+ ideapad_unregister_rfkill(priv, i); >+ } > ideapad_input_exit(priv); > ideapad_debugfs_exit(priv); > ideapad_sysfs_exit(priv);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1021036
:
871738
|
910736
|
911300