msm: smd_tty: Remove hard-coded PIL names
Update PIL subsystem naming to use SMD lookup
instead of hardcoding the subsystem names.
Change-Id: I937dcb9735582cc93c3af3aee9e23bdaa79df65b
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
diff --git a/arch/arm/mach-msm/smd_tty.c b/arch/arm/mach-msm/smd_tty.c
index 4248be4..d856024 100644
--- a/arch/arm/mach-msm/smd_tty.c
+++ b/arch/arm/mach-msm/smd_tty.c
@@ -235,7 +235,7 @@
int res = 0;
unsigned int n = tty->index;
struct smd_tty_info *info;
- char *peripheral = NULL;
+ const char *peripheral = NULL;
if (n >= MAX_SMD_TTYS || !smd_tty[n].smd)
@@ -247,9 +247,7 @@
tty->driver_data = info;
if (info->open_count++ == 0) {
- if (smd_tty[n].smd->edge == SMD_APPS_MODEM)
- peripheral = "modem";
-
+ peripheral = smd_edge_to_subsystem(smd_tty[n].smd->edge);
if (peripheral) {
info->pil = pil_get(peripheral);
if (IS_ERR(info->pil)) {